Skip to content

Commit 2e5b053

Browse files
Eran Ben ElishaSaeed Mahameed
authored andcommitted
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: de8650a ("net/mlx5e: Add tx reporter support") Signed-off-by: Eran Ben Elisha <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent c7981be commit 2e5b053

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ int mlx5e_tx_reporter_create(struct mlx5e_priv *priv)
297297
netdev_warn(priv->netdev,
298298
"Failed to create tx reporter, err = %ld\n",
299299
PTR_ERR(priv->tx_reporter));
300-
return PTR_ERR_OR_ZERO(priv->tx_reporter);
300+
return IS_ERR_OR_NULL(priv->tx_reporter);
301301
}
302302

303303
void mlx5e_tx_reporter_destroy(struct mlx5e_priv *priv)

0 commit comments

Comments
 (0)