[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <X9nHbMqEyI/xPfGd@mwanda>
Date: Wed, 16 Dec 2020 11:38:04 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Shahed Shaikh <shshaikh@...vell.com>,
Sony Chacko <sony.chacko@...gic.com>
Cc: Manish Chopra <manishc@...vell.com>, GR-Linux-NIC-Dev@...vell.com,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Sucheta Chakraborty <sucheta.chakraborty@...gic.com>,
Sritej Velaga <sritej.velaga@...gic.com>,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH net] 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@...cle.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 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;
}
--
2.29.2
Powered by blists - more mailing lists