]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
net/mlx5e: Fix set vf link state error flow
authorRoi Dayan <roid@mellanox.com>
Wed, 13 Nov 2019 12:42:00 +0000 (14:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Nov 2019 09:07:36 +0000 (10:07 +0100)
[ Upstream commit 751021218f7e66ee9bbaa2be23056e447cd75ec4 ]

Before this commit the ndo always returned success.
Fix that.

Fixes: 1ab2068a4c66 ("net/mlx5: Implement vports admin state backup/restore")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

index 1f3891fde2eb171be76294b45aefcfab57f9990e..a3b2ce1125081c3a2d951d185a80682e847a4062 100644 (file)
@@ -2044,7 +2044,7 @@ int mlx5_eswitch_set_vport_state(struct mlx5_eswitch *esw,
 
 unlock:
        mutex_unlock(&esw->state_lock);
-       return 0;
+       return err;
 }
 
 int mlx5_eswitch_get_vport_config(struct mlx5_eswitch *esw,