Commit 632c4ae6 authored by Wei Li's avatar Wei Li Committed by Martin K. Petersen
Browse files

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: 8674a8aa ("scsi: fdomain: Add PCMCIA support")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWei Li <liwei391@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e9b1adb7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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) {