Skip to content

Commit 772ac5e

Browse files
Eran Ben ElishaSaeed Mahameed
authored andcommitted
net/mlx5e: Fix warn print in case of TX reporter creation failure
Print warning message in case of TX reporter creation failure, only if the return value is ERR_PTR type. NULL pointer return indicates that NET_DEVLINK is not set, and the warning print can be skipped. Fixes: de8650a ("net/mlx5e: Add tx reporter support") Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
1 parent 97417f6 commit 772ac5e

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
@@ -281,7 +281,7 @@ int mlx5e_tx_reporter_create(struct mlx5e_priv *priv)
281281
devlink_health_reporter_create(devlink, &mlx5_tx_reporter_ops,
282282
MLX5_REPORTER_TX_GRACEFUL_PERIOD,
283283
true, priv);
284-
if (IS_ERR_OR_NULL(priv->tx_reporter))
284+
if (IS_ERR(priv->tx_reporter))
285285
netdev_warn(priv->netdev,
286286
"Failed to create tx reporter, err = %ld\n",
287287
PTR_ERR(priv->tx_reporter));

0 commit comments

Comments
 (0)