]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
qlcnic: Fix return value in qlcnic_probe()
authorYongjian Xu <xuyongjiande@gmail.com>
Tue, 30 Dec 2014 08:03:46 +0000 (16:03 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Jan 2015 00:21:19 +0000 (19:21 -0500)
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>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c

index 9929b97cfb3629d1afb04809f8faefd7302347b8..2528c3fb6b90b6976017082867327ade23a3d70e 100644 (file)
@@ -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;
        }