Linux PARISC architecture development
 help / color / mirror / Atom feed
* [PATCH] zalon: fix oops on attach failure
@ 2009-06-24 19:55 James Bottomley
  0 siblings, 0 replies; only message in thread
From: James Bottomley @ 2009-06-24 19:55 UTC (permalink / raw)
  To: linux-scsi, Parisc List

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.

James

---

diff --git a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c
index 97f3158..27e84e4 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)) {
 	  dev_printk(KERN_ERR, &dev->dev, "irq problem with %d, detaching\n ",



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-24 19:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-24 19:55 [PATCH] zalon: fix oops on attach failure James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox