Skip to content

Commit 68ec32d

Browse files
Wang HaiSaeed Mahameed
authored andcommitted
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: aedd133 ("net/mlx5e: Support CT offload for tc nic flows") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wang Hai <wanghai38@huawei.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent 5b8631c commit 68ec32d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • drivers/net/ethernet/mellanox/mlx5/core

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5229,8 +5229,10 @@ int mlx5e_tc_nic_init(struct mlx5e_priv *priv)
52295229

52305230
tc->ct = mlx5_tc_ct_init(priv, tc->chains, &priv->fs.tc.mod_hdr,
52315231
MLX5_FLOW_NAMESPACE_KERNEL);
5232-
if (IS_ERR(tc->ct))
5232+
if (IS_ERR(tc->ct)) {
5233+
err = PTR_ERR(tc->ct);
52335234
goto err_ct;
5235+
}
52345236

52355237
tc->netdevice_nb.notifier_call = mlx5e_tc_netdev_event;
52365238
err = register_netdevice_notifier_dev_net(priv->netdev,

0 commit comments

Comments
 (0)