mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ashutosh Naik <ashutosh.naik@gmail.com>
To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	James.Bottomley@steeleye.com, Andrew Morton <akpm@osdl.org>
Subject: [PATCH] scsi/aha1740.c Handle scsi_add_host failure
Date: Tue, 10 Jan 2006 17:51:15 +0530	[thread overview]
Message-ID: <81083a450601100421t5f8fcc4am2c0ec666feccc4ca@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 124 bytes --]

Add scsi_add_host() failure handling for Adaptec aha1740 driver.

Signed-off-by: Ashutosh Naik <ashutosh.naik@gmail.com>

[-- Attachment #2: aha1740.txt --]
[-- Type: text/plain, Size: 897 bytes --]

diff -Naurp linux-2.6.15-git5-vanilla/drivers/scsi/aha1740.c linux-2.6.15-git5/drivers/scsi/aha1740.c
--- linux-2.6.15-git5-vanilla/drivers/scsi/aha1740.c	2006-01-03 08:51:10.000000000 +0530
+++ linux-2.6.15-git5/drivers/scsi/aha1740.c	2006-01-10 16:22:13.000000000 +0530
@@ -587,7 +587,7 @@ static struct scsi_host_template aha1740
 
 static int aha1740_probe (struct device *dev)
 {
-	int slotbase;
+	int slotbase, retval;
 	unsigned int irq_level, irq_type, translation;
 	struct Scsi_Host *shpnt;
 	struct aha1740_hostdata *host;
@@ -642,7 +642,13 @@ static int aha1740_probe (struct device 
 	}
 
 	eisa_set_drvdata (edev, shpnt);
-	scsi_add_host (shpnt, dev); /* XXX handle failure */
+	retval = scsi_add_host (shpnt, dev);
+	if (retval) {
+		printk(KERN_WARNING "aha1740: scsi_add_host failed\n");
+		scsi_host_put (shpnt);
+		return retval;
+	}
+		
 	scsi_scan_host (shpnt);
 	return 0;
 

             reply	other threads:[~2006-01-10 12:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-10 12:21 Ashutosh Naik [this message]
2006-01-13 18:05 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81083a450601100421t5f8fcc4am2c0ec666feccc4ca@mail.gmail.com \
    --to=ashutosh.naik@gmail.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®