All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [patch v2] net/mlx5: missing error code in esw_create_offloads_fdb_table()
Date: Wed, 13 Jul 2016 11:48:44 +0000	[thread overview]
Message-ID: <20160713100825.GD29468@mwanda> (raw)

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@oracle.com>
---
v2: return -ENOTSUPP instead --EINVAL

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 = -ENOTSUPP;
 		esw_warn(dev, "Failed to get FDB flow namespace\n");
 		goto ns_err;
 	}


WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [patch] net/mlx5: missing error code in esw_create_offloads_fdb_table()
Date: Wed, 13 Jul 2016 13:08:25 +0300	[thread overview]
Message-ID: <20160713100825.GD29468@mwanda> (raw)

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

             reply	other threads:[~2016-07-13 11:48 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 10:08 Dan Carpenter [this message]
2016-07-13 11:48 ` [patch v2] net/mlx5: missing error code in esw_create_offloads_fdb_table() Dan Carpenter
2016-07-13 11:19 ` [patch] " Matan Barak
2016-07-13 11:19   ` Matan Barak
2016-07-13 11:19   ` Matan Barak
2016-07-13 11:40   ` Or Gerlitz
2016-07-13 11:40     ` Or Gerlitz
2016-07-13 11:40     ` Or Gerlitz
2016-07-14 20:09     ` Leon Romanovsky
2016-07-14 20:09       ` Leon Romanovsky
2016-07-14 20:09       ` Leon Romanovsky
2016-07-13 11:29 ` Leon Romanovsky
2016-07-13 11:29   ` Leon Romanovsky
2016-07-13 11:29   ` Leon Romanovsky
2016-07-13 11:53 ` [patch v2] " Matan Barak
2016-07-13 11:53   ` Matan Barak
2016-07-13 11:53   ` Matan Barak
2016-07-13 13:04 ` Leon Romanovsky
2016-07-13 13:04   ` Leon Romanovsky
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 13:17       ` Matan Barak
2016-07-13 13:17       ` Matan Barak
2016-07-13 17:54 ` Jason Gunthorpe
2016-07-13 17:54   ` Jason Gunthorpe
2016-07-14  5:56   ` Leon Romanovsky
2016-07-14  5:56     ` Leon Romanovsky
2016-07-14  5:56     ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160713100825.GD29468@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.