summaryrefslogtreecommitdiff
path: root/drivers/scsi/pcmcia
diff options
context:
space:
mode:
authorWei Li <liwei391@huawei.com>2021-07-15 11:26:25 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2021-08-09 23:30:25 -0400
commit632c4ae6da1d629eddf9da1e692d7617c568c256 (patch)
treea95af1cdddac64a7c835df66fa923d3f66335d8d /drivers/scsi/pcmcia
parente9b1adb7c5e35dccace0341db4d9e9c9fb40eeef (diff)
scsi: fdomain: Fix error return code in fdomain_probe()
If request_region() fails the return value is not set. Return -EBUSY on error. Link: https://lore.kernel.org/r/20210715032625.1395495-1-liwei391@huawei.com Fixes: 8674a8aa2c39 ("scsi: fdomain: Add PCMCIA support") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Li <liwei391@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/pcmcia')
-rw-r--r--drivers/scsi/pcmcia/fdomain_cs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/pcmcia/fdomain_cs.c b/drivers/scsi/pcmcia/fdomain_cs.c
index e42acf314d06..33df6a9ba9b5 100644
--- a/drivers/scsi/pcmcia/fdomain_cs.c
+++ b/drivers/scsi/pcmcia/fdomain_cs.c
@@ -45,8 +45,10 @@ static int fdomain_probe(struct pcmcia_device *link)
goto fail_disable;
if (!request_region(link->resource[0]->start, FDOMAIN_REGION_SIZE,
- "fdomain_cs"))
+ "fdomain_cs")) {
+ ret = -EBUSY;
goto fail_disable;
+ }
sh = fdomain_create(link->resource[0]->start, link->irq, 7, &link->dev);
if (!sh) {