From: Dan Carpenter Date: Wed, 16 Dec 2020 08:38:04 +0000 (+0300) Subject: qlcnic: Fix error code in probe X-Git-Tag: accepted/tizen/unified/20230118.172025~8226^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d52848632a357948028eab67ff9b7cc0c12a0fb;p=platform%2Fkernel%2Flinux-rpi.git 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 Link: https://lore.kernel.org/r/X9nHbMqEyI/xPfGd@mwanda Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index 5a7e240..c2faf96 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; }