Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 521130d1 authored by Eugenia Emantayev's avatar Eugenia Emantayev Committed by David S. Miller
Browse files

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: default avatarEugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: default avatarYevgeny Petrilin <yevgenyp@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bef772eb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
	}