scsi: pcmcia: fdomain: Fix an error code in probe()
Subsystems (2)
PATCH 1/1 scsi: pcmcia: fdomain: Fix an error code in probe()
If request_region() fails, the driver should return -EBUSY but this code accidentally returns success.
Fixes 8674a8aa2c39 ("scsi: fdomain: Add PCMCIA support")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/scsi/pcmcia/fdomain_cs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/pcmcia/fdomain_cs.c +3 -1
@@ -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) {
Signature · 1 line
2.20.1
Hi Dan!
Quoted 2 lines
If
request_region()fails, the driver should return-EBUSYbut this code accidentally returns success.
Identical fix was merged as 632c4ae6da1d.
Thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering