Commit e53e6655 authored by Colin Ian King's avatar Colin Ian King Committed by Saeed Mahameed
Browse files

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: 8463daf1 ("net/mlx5: Add support to use SMFS in switchdev mode")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent 4938c3d8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;