mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scsi/arm/ecoscsi.c Handle scsi_add_host failure
@ 2006-01-10 12:41 Ashutosh Naik
  2006-01-10 13:05 ` Ashutosh Naik
  2006-01-13 18:06 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Ashutosh Naik @ 2006-01-10 12:41 UTC (permalink / raw)
  To: linux-scsi, James.Bottomley, Andrew Morton, linux-kernel; +Cc: linux

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

Add scsi_add_host() failure handling for ecoscsi driver.

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

[-- Attachment #2: ecoscsi.txt --]
[-- Type: text/plain, Size: 648 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 17:59:21.000000000 +0530
@@ -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;
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi/arm/ecoscsi.c Handle scsi_add_host failure
  2006-01-10 12:41 [PATCH] scsi/arm/ecoscsi.c Handle scsi_add_host failure Ashutosh Naik
@ 2006-01-10 13:05 ` Ashutosh Naik
  2006-01-13 18:06 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Ashutosh Naik @ 2006-01-10 13:05 UTC (permalink / raw)
  To: linux-scsi, James.Bottomley, Andrew Morton, linux-kernel

[-- 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;
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi/arm/ecoscsi.c Handle scsi_add_host failure
  2006-01-10 12:41 [PATCH] scsi/arm/ecoscsi.c Handle scsi_add_host failure Ashutosh Naik
  2006-01-10 13:05 ` Ashutosh Naik
@ 2006-01-13 18:06 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2006-01-13 18:06 UTC (permalink / raw)
  To: Ashutosh Naik
  Cc: linux-scsi, James.Bottomley, Andrew Morton, linux-kernel, linux

same issue as with the last patch.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-13 18:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-10 12:41 [PATCH] scsi/arm/ecoscsi.c Handle scsi_add_host failure Ashutosh Naik
2006-01-10 13:05 ` Ashutosh Naik
2006-01-13 18:06 ` Christoph Hellwig

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®