net/mlx5: fix error return code in mlx5e_tc_nic_init()
Subsystems (5)
PATCH 1/1 net/mlx5: fix error return code in mlx5e_tc_nic_init()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
Fixes aedd133d17bc ("net/mlx5e: Support CT offload for tc nic flows")
Reported-by Hulk Robot <[email protected]>
Signed-off-by Wang Hai <[email protected]>
--- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +3 -1
@@ -5227,8 +5227,10 @@ int mlx5e_tc_nic_init(struct mlx5e_priv *priv) tc->ct =mlx5_tc_ct_init (priv, tc->chains, &priv->fs.tc.mod_hdr,MLX5_FLOW_NAMESPACE_KERNEL ); -if (IS_ERR (tc->ct)) +if (IS_ERR (tc->ct)) { + err =PTR_ERR (tc->ct); goto err_ct; + } tc->netdevice_nb.notifier_call = mlx5e_tc_netdev_event; err = register_netdevice_notifier_dev_net(priv->netdev,
Signature · 1 line
2.17.1
Saeed Mahameed
AppliedQuoted 28 lines · Wang Hai
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
Fixes aedd133d17bc ("net/mlx5e: Support CT offload for tc nicflows")
Reported-by Hulk Robot <[email protected]>Signed-off-by Wang Hai <[email protected]>--- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +3
-1@@ -5227,8 +5227,10 @@ int mlx5e_tc_nic_init(struct mlx5e_priv *priv) tc->ct =mlx5_tc_ct_init (priv, tc->chains, &priv- >fs.tc.mod_hdr,MLX5_FLOW_NAMESPACE_KERNEL ); -if (IS_ERR (tc->ct)) +if (IS_ERR (tc->ct)) { + err =PTR_ERR (tc->ct); goto err_ct; + } tc->netdevice_nb.notifier_call = mlx5e_tc_netdev_event;
Quoted 1 line
err = register_netdevice_notifier_dev_net(priv->netdev,
Applied to net-mlx5
Thanks !