aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-09-04 20:29:14 +0100
committerSaeed Mahameed <saeedm@mellanox.com>2019-09-05 14:44:41 -0700
commite53e665558eea32e76585c3d3a5786e7298045ad (patch)
tree4f7acb2957f2bcd0164b12758c675e49ac769f4f /drivers/net/ethernet/mellanox
parentnet/mlx5: fix spelling mistake "offlaods" -> "offloads" (diff)
downloadlinux-dev-e53e665558eea32e76585c3d3a5786e7298045ad.tar.xz
linux-dev-e53e665558eea32e76585c3d3a5786e7298045ad.zip
net/mlx5: fix missing assignment of variable err
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> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c2
1 files changed, 1 insertions, 1 deletions
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;