Skip to content

Commit 1166add

Browse files
ozshlomoSaeed Mahameed
authored andcommitted
net/mlx5e: TC, fix missing error code
Missing error code when mlx5e_tc_act_stats_create fails Fixes: d13674b ("net/mlx5e: TC, map tc action cookie to a hw counter") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Oz Shlomo <[email protected]> Reviewed-by: Paul Blakey <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent d1a0075 commit 1166add

File tree

1 file changed

+6
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5305,8 +5305,10 @@ int mlx5e_tc_nic_init(struct mlx5e_priv *priv)
53055305
mlx5e_tc_debugfs_init(tc, mlx5e_fs_get_debugfs_root(priv->fs));
53065306

53075307
tc->action_stats_handle = mlx5e_tc_act_stats_create();
5308-
if (IS_ERR(tc->action_stats_handle))
5308+
if (IS_ERR(tc->action_stats_handle)) {
5309+
err = PTR_ERR(tc->action_stats_handle);
53095310
goto err_act_stats;
5311+
}
53105312

53115313
return 0;
53125314

@@ -5441,8 +5443,10 @@ int mlx5e_tc_esw_init(struct mlx5_rep_uplink_priv *uplink_priv)
54415443
}
54425444

54435445
uplink_priv->action_stats_handle = mlx5e_tc_act_stats_create();
5444-
if (IS_ERR(uplink_priv->action_stats_handle))
5446+
if (IS_ERR(uplink_priv->action_stats_handle)) {
5447+
err = PTR_ERR(uplink_priv->action_stats_handle);
54455448
goto err_action_counter;
5449+
}
54465450

54475451
return 0;
54485452

0 commit comments

Comments
 (0)