From: Eugenia Emantayev Date: Wed, 5 Sep 2012 22:50:52 +0000 (+0000) Subject: net/mlx4_core: Return the error value in case of command initialization failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=521130d11fd37b328543477df5522704a0e7cf2c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Yevgeny Petrilin Signed-off-by: David S. Miller --- 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) } 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; }