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: 8463daf17e
("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>
This commit is contained in:
parent
4938c3d845
commit
e53e665558
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user