mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-03 00:50:40 -05:00
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: de8650a820 ("net/mlx5e: Add tx reporter support")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
committed by
Saeed Mahameed
parent
c7981bea48
commit
2e5b053462
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user