netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] net/mlx5: missing error code in esw_create_offloads_fdb_table()
@ 2016-07-13 10:08 Dan Carpenter
  2016-07-13 11:19 ` Matan Barak
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Dan Carpenter @ 2016-07-13 10:08 UTC (permalink / raw)
  To: Matan Barak, Or Gerlitz
  Cc: Leon Romanovsky, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA

We accidentally return success when we had intended to return an error
code.

Fixes: 69697b6e2086 ('net/mlx5: E-Switch, Add support for the sriov offloads mode')
Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index 1842dfb..7d982cf 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -183,6 +183,7 @@ static int esw_create_offloads_fdb_table(struct mlx5_eswitch *esw, int nvports)
 
 	root_ns = mlx5_get_flow_namespace(dev, MLX5_FLOW_NAMESPACE_FDB);
 	if (!root_ns) {
+		err = -EINVAL;
 		esw_warn(dev, "Failed to get FDB flow namespace\n");
 		goto ns_err;
 	}
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2016-07-14 20:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-13 10:08 [patch] net/mlx5: missing error code in esw_create_offloads_fdb_table() Dan Carpenter
2016-07-13 11:19 ` Matan Barak
2016-07-13 11:40   ` Or Gerlitz
2016-07-14 20:09     ` Leon Romanovsky
2016-07-13 11:29 ` Leon Romanovsky
2016-07-13 11:53 ` [patch v2] " Matan Barak
2016-07-13 13:04 ` Leon Romanovsky
     [not found]   ` <20160713130459.GF10079-2ukJVAZIZ/Y@public.gmane.org>
2016-07-13 13:17     ` Matan Barak
2016-07-13 17:54 ` Jason Gunthorpe
2016-07-14  5:56   ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).