aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-24 19:55:22 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2009-07-30 16:05:59 -0700
commitd9120d6d357e869bd8d064b38ac33a6b48ba36c9 (patch)
tree3b4d1cc0aed44aaeefed11aef72e098ea2b851a2 /drivers
parent77a09356416cd30aaef5111c5a20c2167479e635 (diff)
SCSI: zalon: fix oops on attach failure
commit d3a263a8168f78874254ea9da9595cfb0f3e96d7 upstream. I recently discovered on my zalon that if the attachment fails because of a bus misconfiguration (I scrapped my HVD array, so the card is now unterminated) then the system oopses. The reason is that if ncr_attach() returns NULL (signalling failure) that NULL is passed by the goto failed straight into ncr_detach() which oopses. The fix is just to return -ENODEV in this case. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/zalon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c
index 3c4a300494a..b8171de8f09 100644
--- a/drivers/scsi/zalon.c
+++ b/drivers/scsi/zalon.c
@@ -134,7 +134,7 @@ zalon_probe(struct parisc_device *dev)
host = ncr_attach(&zalon7xx_template, unit, &device);
if (!host)
- goto fail;
+ return -ENODEV;
if (request_irq(dev->irq, ncr53c8xx_intr, IRQF_SHARED, "zalon", host)) {
printk(KERN_ERR "%s: irq problem with %d, detaching\n ",