scsi: fdomain: Fix error return code in fdomain_probe()
[ Upstream commit 632c4ae6da1d629eddf9da1e692d7617c568c256 ]
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: 8674a8aa2c
("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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
f02ab9d1d3
commit
6291fd0eea
@@ -45,8 +45,10 @@ static int fdomain_probe(struct pcmcia_device *link)
|
|||||||
goto fail_disable;
|
goto fail_disable;
|
||||||
|
|
||||||
if (!request_region(link->resource[0]->start, FDOMAIN_REGION_SIZE,
|
if (!request_region(link->resource[0]->start, FDOMAIN_REGION_SIZE,
|
||||||
"fdomain_cs"))
|
"fdomain_cs")) {
|
||||||
|
ret = -EBUSY;
|
||||||
goto fail_disable;
|
goto fail_disable;
|
||||||
|
}
|
||||||
|
|
||||||
sh = fdomain_create(link->resource[0]->start, link->irq, 7, &link->dev);
|
sh = fdomain_create(link->resource[0]->start, link->irq, 7, &link->dev);
|
||||||
if (!sh) {
|
if (!sh) {
|
||||||
|
Reference in New Issue
Block a user