diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2016-01-03 16:05:21 +1100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-01-06 21:42:56 -0500 |
commit | 0ad0eff98fec3c940ec199047ff580abaaa5bb1a (patch) | |
tree | edbaaf6760250383f1bf45fe39e48a1422985126 /drivers/scsi/pas16.c | |
parent | e52bbd5ccf53d2a73e524adb26b6d8a4f810ccb4 (diff) | |
download | blackbird-op-linux-0ad0eff98fec3c940ec199047ff580abaaa5bb1a.tar.gz blackbird-op-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 'drivers/scsi/pas16.c')
-rw-r--r-- | drivers/scsi/pas16.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c index e5c76eefa5e0..5e57ee01093c 100644 --- a/drivers/scsi/pas16.c +++ b/drivers/scsi/pas16.c @@ -378,11 +378,12 @@ static int __init pas16_detect(struct scsi_host_template *tpnt) instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata)); if(instance == NULL) - break; + goto out; instance->io_port = io_port; - NCR5380_init(instance, 0); + if (NCR5380_init(instance, 0)) + goto out_unregister; NCR5380_maybe_reset_bus(instance); @@ -418,6 +419,11 @@ static int __init pas16_detect(struct scsi_host_template *tpnt) ++count; } return count; + +out_unregister: + scsi_unregister(instance); +out: + return count; } /* |