diff options
author | Eugenia Emantayev <eugenia@mellanox.com> | 2012-09-05 18:50:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-07 12:55:59 -0400 |
commit | 521130d11fd37b328543477df5522704a0e7cf2c (patch) | |
tree | 5459ca02c8b4a95d977bf9af2fff3e13d6bb35f3 /drivers/net/ethernet/mellanox/mlx4/main.c | |
parent | bef772eb06051f49e84c3168f189b65074f19c3d (diff) |
net/mlx4_core: Return the error value in case of command initialization failure
If mlx4_cmd_init() failed, the init_one function returned
success, although no resources were opened.
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/main.c')
-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 0fadac546b00..2f816c6aed72 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c | |||
@@ -1997,7 +1997,8 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1997 | } | 1997 | } |
1998 | 1998 | ||
1999 | slave_start: | 1999 | slave_start: |
2000 | if (mlx4_cmd_init(dev)) { | 2000 | err = mlx4_cmd_init(dev); |
2001 | if (err) { | ||
2001 | mlx4_err(dev, "Failed to init command interface, aborting.\n"); | 2002 | mlx4_err(dev, "Failed to init command interface, aborting.\n"); |
2002 | goto err_sriov; | 2003 | goto err_sriov; |
2003 | } | 2004 | } |