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/arm/oak.c | |
parent | e52bbd5ccf53d2a73e524adb26b6d8a4f810ccb4 (diff) | |
download | op-kernel-dev-0ad0eff98fec3c940ec199047ff580abaaa5bb1a.zip op-kernel-dev-0ad0eff98fec3c940ec199047ff580abaaa5bb1a.tar.gz |
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/arm/oak.c')
-rw-r--r-- | drivers/scsi/arm/oak.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/scsi/arm/oak.c b/drivers/scsi/arm/oak.c index ca0f31d..db337b9 100644 --- a/drivers/scsi/arm/oak.c +++ b/drivers/scsi/arm/oak.c @@ -143,17 +143,21 @@ static int oakscsi_probe(struct expansion_card *ec, const struct ecard_id *id) host->irq = NO_IRQ; host->n_io_port = 255; - NCR5380_init(host, 0); + ret = NCR5380_init(host, 0); + if (ret) + goto out_unmap; NCR5380_maybe_reset_bus(host); ret = scsi_add_host(host, &ec->dev); if (ret) - goto out_unmap; + goto out_exit; scsi_scan_host(host); goto out; + out_exit: + NCR5380_exit(host); out_unmap: iounmap(priv(host)->base); unreg: |