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, James.Bottomley@steeleye.com,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi/arm/ecoscsi.c Handle scsi_add_host failure
Date: Tue, 10 Jan 2006 18:35:55 +0530	[thread overview]
Message-ID: <81083a450601100505m73f4580cvb6a4a0c6ceb9791d@mail.gmail.com> (raw)
In-Reply-To: <81083a450601100441s7675d584jd10db5a8e6ccaf58@mail.gmail.com>

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

Oops, Missed declaring the variable "retval". This one works for sure.
Please apply this patch and drop the previous one. Sorry about that.
-Ashutosh

Add scsi_add_host() failure handling for the ecoscsi driver.

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

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

diff -Naurp linux-2.6.15-git5-vanilla/drivers/scsi/arm/ecoscsi.c linux-2.6.15-git5/drivers/scsi/arm/ecoscsi.c
--- linux-2.6.15-git5-vanilla/drivers/scsi/arm/ecoscsi.c	2006-01-03 08:51:10.000000000 +0530
+++ linux-2.6.15-git5/drivers/scsi/arm/ecoscsi.c	2006-01-10 18:23:12.000000000 +0530
@@ -174,7 +174,7 @@ static struct Scsi_Host *host;
 
 static int __init ecoscsi_init(void)
 {
-
+	int retval;
 	host = scsi_host_alloc(tpnt, sizeof(struct NCR5380_hostdata));
 	if (!host)
 		return 0;
@@ -203,7 +203,13 @@ static int __init ecoscsi_init(void)
 	NCR5380_print_options(host);
 	printk("\n");
 
-	scsi_add_host(host, NULL); /* XXX handle failure */
+	retval = scsi_add_host(host, NULL);
+	if (retval) {
+		printk(KERN_WARNING "ecoscsi: scsi_add_host failed\n");
+		scsi_host_put(host);
+		return retval;
+	}
+
 	scsi_scan_host(host);
 	return 0;
 

  reply	other threads:[~2006-01-10 13:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-10 12:41 Ashutosh Naik
2006-01-10 13:05 ` Ashutosh Naik [this message]
2006-01-13 18:06 ` 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=81083a450601100505m73f4580cvb6a4a0c6ceb9791d@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®