]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net/mlx5e: Fix warn print in case of TX reporter creation failure
authorEran Ben Elisha <eranbe@mellanox.com>
Tue, 19 Feb 2019 13:05:12 +0000 (15:05 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 22 Feb 2019 21:38:24 +0000 (13:38 -0800)
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: de8650a82071 ("net/mlx5e: Add tx reporter support")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c

index 0aebfb377cf04edd6b8fab5e6e1de43fd8be3c0f..e05b8fce8dbb923b4af030488b4b919cc9948d9a 100644 (file)
@@ -281,7 +281,7 @@ int mlx5e_tx_reporter_create(struct mlx5e_priv *priv)
                devlink_health_reporter_create(devlink, &mlx5_tx_reporter_ops,
                                               MLX5_REPORTER_TX_GRACEFUL_PERIOD,
                                               true, priv);
-       if (IS_ERR_OR_NULL(priv->tx_reporter))
+       if (IS_ERR(priv->tx_reporter))
                netdev_warn(priv->netdev,
                            "Failed to create tx reporter, err = %ld\n",
                            PTR_ERR(priv->tx_reporter));