Skip to content

Commit

Permalink
scsi: fdomain: Fix error return code in fdomain_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit 632c4ae ]

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: 8674a8a ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
stkid authored and gregkh committed Sep 18, 2021
1 parent e519433 commit 9a3fda1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/scsi/pcmcia/fdomain_cs.c
Expand Up @@ -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) {
Expand Down

0 comments on commit 9a3fda1

Please sign in to comment.