* [PATCH] scsi: megarad: Fix the return value of the probe function
@ 2021-10-20 14:17 Zheyu Ma
0 siblings, 0 replies; only message in thread
From: Zheyu Ma @ 2021-10-20 14:17 UTC (permalink / raw)
To: kashyap.desai, sumit.saxena, shivasharan.srikanteshwara, jejb,
martin.petersen
Cc: megaraidlinux.pdl, linux-scsi, linux-kernel, Zheyu Ma
During the process of driver probing, the probe function should return < 0
for failure, otherwise, the kernel will treat value > 0 as success.
Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
---
drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index e4298bf4a482..b94f9557b2fa 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -7468,7 +7468,7 @@ static int megasas_probe_one(struct pci_dev *pdev,
case PCI_DEVICE_ID_LSI_AERO_10E4:
case PCI_DEVICE_ID_LSI_AERO_10E7:
dev_err(&pdev->dev, "Adapter is in non secure mode\n");
- return 1;
+ return -ENODEV;
case PCI_DEVICE_ID_LSI_AERO_10E1:
case PCI_DEVICE_ID_LSI_AERO_10E5:
dev_info(&pdev->dev, "Adapter is in configurable secure mode\n");
--
2.17.6
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-20 14:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-20 14:17 [PATCH] scsi: megarad: Fix the return value of the probe function Zheyu Ma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox