diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2014-06-22 13:21:34 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-28 08:08:22 -0700 |
commit | 58577b979f0d16a32255554da21a4cde2f7b9b42 (patch) | |
tree | 992ce6ada497928d79cccf3223e73ffc1eb2da22 | |
parent | d1e5f50067ae61402adeb9de4fb365f861033bff (diff) | |
download | lwn-58577b979f0d16a32255554da21a4cde2f7b9b42.tar.gz lwn-58577b979f0d16a32255554da21a4cde2f7b9b42.zip |
net/mlx4_core: Fix the error flow when probing with invalid VF configuration
[ Upstream commit 960b1f454e1ace6b76718f22828bcc3594a09422 ]
Single ported VF are currently not supported on configurations where
one or both ports are IB. When we hit this case, the relevant flow in
the driver didn't return error and jumped to the wrong label. Fix that.
Fixes: dd41cc3 ('net/mlx4: Adapt num_vfs/probed_vf params for single port VF')
Reported-by: Shirley Ma <shirley.ma@oracle.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 8fa321f39dfd..52b4c3986c99 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -2466,7 +2466,8 @@ slave_start: "with IB port. Single port VFs syntax" " is only supported when all ports " "are configured as ethernet\n"); - goto err_close; + err = -EINVAL; + goto err_master_mfunc; } for (i = 0; i < sizeof(nvfs)/sizeof(nvfs[0]); i++) { unsigned j; |