Linux-RDMA Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH][next] net/mlx5: fix missing assignment of variable err
@ 2019-09-04 19:29 Colin King
  2019-09-04 23:30 ` Saeed Mahameed
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-09-04 19:29 UTC (permalink / raw)
  To: Maor Gottlieb, Saeed Mahameed, Leon Romanovsky, David S . Miller,
	netdev, linux-rdma
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The error return from a call to mlx5_flow_namespace_set_peer is not
being assigned to variable err and hence the error check following
the call is currently not working.  Fix this by assigning ret as
intended.

Addresses-Coverity: ("Logically dead code")
Fixes: 8463daf17e80 ("net/mlx5: Add support to use SMFS in switchdev mode")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index afa623b15a38..00d71db15f22 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -1651,7 +1651,7 @@ static int mlx5_esw_offloads_set_ns_peer(struct mlx5_eswitch *esw,
 		if (err)
 			return err;
 
-		mlx5_flow_namespace_set_peer(peer_ns, ns);
+		err = mlx5_flow_namespace_set_peer(peer_ns, ns);
 		if (err) {
 			mlx5_flow_namespace_set_peer(ns, NULL);
 			return err;
-- 
2.20.1


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

* Re: [PATCH][next] net/mlx5: fix missing assignment of variable err
  2019-09-04 19:29 [PATCH][next] net/mlx5: fix missing assignment of variable err Colin King
@ 2019-09-04 23:30 ` Saeed Mahameed
  0 siblings, 0 replies; 2+ messages in thread
From: Saeed Mahameed @ 2019-09-04 23:30 UTC (permalink / raw)
  To: linux-rdma, Maor Gottlieb, colin.king, davem, leon, netdev
  Cc: kernel-janitors, linux-kernel

On Wed, 2019-09-04 at 20:29 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The error return from a call to mlx5_flow_namespace_set_peer is not
> being assigned to variable err and hence the error check following
> the call is currently not working.  Fix this by assigning ret as
> intended.
> 
> Addresses-Coverity: ("Logically dead code")
> Fixes: 8463daf17e80 ("net/mlx5: Add support to use SMFS in switchdev
> mode")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---

Applied to net-next-mlx5.

I have a cleanup series coming up, will send it all together to 
net-next soon. 

Thanks,
Saeed.

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 19:29 [PATCH][next] net/mlx5: fix missing assignment of variable err Colin King
2019-09-04 23:30 ` Saeed Mahameed

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org linux-rdma@archiver.kernel.org
	public-inbox-index linux-rdma


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/ public-inbox