summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/t128.c
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2016-01-03 06:05:21 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2016-01-07 03:42:56 +0100
commit0ad0eff98fec3c940ec199047ff580abaaa5bb1a (patch)
treeedbaaf6760250383f1bf45fe39e48a1422985126 /drivers/scsi/t128.c
parentncr5380: Cleanup bogus {request,release}_region() calls (diff)
downloadlinux-0ad0eff98fec3c940ec199047ff580abaaa5bb1a.tar.xz
linux-0ad0eff98fec3c940ec199047ff580abaaa5bb1a.zip
ncr5380: Introduce unbound workqueue
Allocate a work queue that will permit busy waiting and sleeping. This means NCR5380_init() can potentially fail, so add this error path. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.com> Tested-by: Ondrej Zary <linux@rainbow-software.org> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
-rw-r--r--drivers/scsi/t128.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/scsi/t128.c b/drivers/scsi/t128.c
index 3adcae1150d2..3dac6d7f5d22 100644
--- a/drivers/scsi/t128.c
+++ b/drivers/scsi/t128.c
@@ -208,12 +208,13 @@ static int __init t128_detect(struct scsi_host_template *tpnt)
found:
instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));
if(instance == NULL)
- break;
-
+ goto out_unmap;
+
instance->base = base;
((struct NCR5380_hostdata *)instance->hostdata)->base = p;
- NCR5380_init(instance, 0);
+ if (NCR5380_init(instance, 0))
+ goto out_unregister;
NCR5380_maybe_reset_bus(instance);
@@ -246,6 +247,12 @@ found:
++count;
}
return count;
+
+out_unregister:
+ scsi_unregister(instance);
+out_unmap:
+ iounmap(p);
+ return count;
}
static int t128_release(struct Scsi_Host *shost)