[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1419926626-26624-1-git-send-email-xuyongjiande@163.com>
Date: Tue, 30 Dec 2014 16:03:46 +0800
From: xuyongjiande@....com
To: shahed.shaikh@...gic.com, Dept-GELinuxNICDev@...gic.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Yongjian Xu <xuyongjiande@...il.com>
Subject: [PATCH] qlcnic: Fix return value in qlcnic_probe()
From: Yongjian Xu <xuyongjiande@...il.com>
If the check of adapter fails and goes into the 'else' branch, the
return value 'err' should not still be zero.
Signed-off-by: Yongjian Xu <xuyongjiande@...il.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 1aa25b1..a95b604 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -2603,6 +2603,7 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
} else {
dev_err(&pdev->dev,
"%s: failed. Please Reboot\n", __func__);
+ err = -ENODEV;
goto err_out_free_hw;
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists