summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/qlogic/qlcnic
diff options
context:
space:
mode:
authorYongjian Xu <xuyongjiande@gmail.com>2014-12-30 11:03:46 +0300
committerDavid S. Miller <davem@davemloft.net>2015-01-01 03:21:19 +0300
commit7824acd92494cf21229ea5313e525fa20927ba26 (patch)
tree02678b1995f9785c1d6ab21da57e4899ffaa0e56 /drivers/net/ethernet/qlogic/qlcnic
parent0f113b81172705f38a1cb94b1644a339e6bdf884 (diff)
downloadlinux-7824acd92494cf21229ea5313e525fa20927ba26.tar.xz
qlcnic: Fix return value in qlcnic_probe()
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@gmail.com> Acked-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 9929b97cfb36..2528c3fb6b90 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -2605,6 +2605,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;
}