diff options
author | Eran Ben Elisha <eranbe@mellanox.com> | 2019-02-20 12:33:01 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2019-02-22 13:38:24 -0800 |
commit | 2e5b0534622fa87fd570d54af2d01ce304b88077 (patch) | |
tree | 47159e58bc89c534a5cfe72f55df29b553f8521d /drivers/net/ethernet | |
parent | c7981bea48fbbbf17215038c3d7c48706dafd6ff (diff) |
net/mlx5e: Fix mlx5e_tx_reporter_create return value
If reporter is ERR_PTR or NULL, error code shall be returned. At all other
cases it shall return success. Fix that.
Fixes: de8650a82071 ("net/mlx5e: Add tx reporter support")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c index 627392bead3b..75dad8797720 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c @@ -297,7 +297,7 @@ int mlx5e_tx_reporter_create(struct mlx5e_priv *priv) netdev_warn(priv->netdev, "Failed to create tx reporter, err = %ld\n", PTR_ERR(priv->tx_reporter)); - return PTR_ERR_OR_ZERO(priv->tx_reporter); + return IS_ERR_OR_NULL(priv->tx_reporter); } void mlx5e_tx_reporter_destroy(struct mlx5e_priv *priv) |