Skip to content

Commit

Permalink
net/mlx4_core: Return the error value in case of command initializati…
Browse files Browse the repository at this point in the history
…on 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>
  • Loading branch information
Eugenia Emantayev authored and David S. Miller committed Sep 7, 2012
1 parent bef772e commit 521130d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/mellanox/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1997,7 +1997,8 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
}

slave_start:
if (mlx4_cmd_init(dev)) {
err = mlx4_cmd_init(dev);
if (err) {
mlx4_err(dev, "Failed to init command interface, aborting.\n");
goto err_sriov;
}
Expand Down

0 comments on commit 521130d

Please sign in to comment.