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>
This commit is contained in:
Yongjian Xu 2014-12-30 16:03:46 +08:00 committed by David S. Miller
parent 0f113b8117
commit 7824acd924

View 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;
}