public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 1/2] net/mlx5e: Fix error code in mlx5e_tc_action_miss_mapping_get()
@ 2023-12-13 14:08 Dan Carpenter
  2023-12-13 14:08 ` [PATCH net 2/2] net/mlx5e: Fix error codes in alloc_branch_attr() Dan Carpenter
  2023-12-13 23:31 ` [PATCH net 1/2] net/mlx5e: Fix error code in mlx5e_tc_action_miss_mapping_get() Saeed Mahameed
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2023-12-13 14:08 UTC (permalink / raw)
  To: Paul Blakey
  Cc: Saeed Mahameed, Leon Romanovsky, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Oz Sholmo, Roi Dayan, netdev,
	linux-rdma, kernel-janitors

Preserve the error code if esw_add_restore_rule() fails.  Don't return
success.

Fixes: 6702782845a5 ("net/mlx5e: TC, Set CT miss to the specific ct action instance")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 5775699e1d3e..30932c9c9a8f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -5736,8 +5736,10 @@ int mlx5e_tc_action_miss_mapping_get(struct mlx5e_priv *priv, struct mlx5_flow_a
 
 	esw = priv->mdev->priv.eswitch;
 	attr->act_id_restore_rule = esw_add_restore_rule(esw, *act_miss_mapping);
-	if (IS_ERR(attr->act_id_restore_rule))
+	if (IS_ERR(attr->act_id_restore_rule)) {
+		err = PTR_ERR(attr->act_id_restore_rule);
 		goto err_rule;
+	}
 
 	return 0;
 
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-13 23:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13 14:08 [PATCH net 1/2] net/mlx5e: Fix error code in mlx5e_tc_action_miss_mapping_get() Dan Carpenter
2023-12-13 14:08 ` [PATCH net 2/2] net/mlx5e: Fix error codes in alloc_branch_attr() Dan Carpenter
2023-12-13 23:31 ` [PATCH net 1/2] net/mlx5e: Fix error code in mlx5e_tc_action_miss_mapping_get() Saeed Mahameed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox