net/mlx5e: TC, fix missing error code
Missing error code when mlx5e_tc_act_stats_create fails Fixes: d13674b1d14c ("net/mlx5e: TC, map tc action cookie to a hw counter") Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Oz Shlomo <ozsh@nvidia.com> Reviewed-by: Paul Blakey <paulb@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
d1a0075ad6
commit
1166add424
@ -5305,8 +5305,10 @@ int mlx5e_tc_nic_init(struct mlx5e_priv *priv)
|
||||
mlx5e_tc_debugfs_init(tc, mlx5e_fs_get_debugfs_root(priv->fs));
|
||||
|
||||
tc->action_stats_handle = mlx5e_tc_act_stats_create();
|
||||
if (IS_ERR(tc->action_stats_handle))
|
||||
if (IS_ERR(tc->action_stats_handle)) {
|
||||
err = PTR_ERR(tc->action_stats_handle);
|
||||
goto err_act_stats;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@ -5441,8 +5443,10 @@ int mlx5e_tc_esw_init(struct mlx5_rep_uplink_priv *uplink_priv)
|
||||
}
|
||||
|
||||
uplink_priv->action_stats_handle = mlx5e_tc_act_stats_create();
|
||||
if (IS_ERR(uplink_priv->action_stats_handle))
|
||||
if (IS_ERR(uplink_priv->action_stats_handle)) {
|
||||
err = PTR_ERR(uplink_priv->action_stats_handle);
|
||||
goto err_action_counter;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user