summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/qlogic
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-12-16 11:38:04 +0300
committerJakub Kicinski <kuba@kernel.org>2020-12-17 21:53:33 +0300
commit0d52848632a357948028eab67ff9b7cc0c12a0fb (patch)
tree78fe895b4aab3f5f568216f6545d0b62aa2bbff8 /drivers/net/ethernet/qlogic
parent86eb09b63da419a7261d7dc96e60fdb0e56e341d (diff)
downloadlinux-0d52848632a357948028eab67ff9b7cc0c12a0fb.tar.xz
qlcnic: Fix error code in probe
Return -EINVAL if we can't find the correct device. Currently it returns success. Fixes: 13159183ec7a ("qlcnic: 83xx base driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/X9nHbMqEyI/xPfGd@mwanda Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/qlogic')
-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 5a7e240fd469..c2faf96fcade 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -2492,6 +2492,7 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
qlcnic_sriov_vf_register_map(ahw);
break;
default:
+ err = -EINVAL;
goto err_out_free_hw_res;
}