login
Header Space

 
 

[patch 35/37] SCSI: aha152x: fix init suspiciously returned 1, it should follow 0/-E convention

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>, <stable@...>, <jejb@...>
Cc: Justin Forbes <jmforbes@...>, Zwane Mwaikambo <zwane@...>, Theodore Ts'o <tytso@...>, Randy Dunlap <rdunlap@...>, Dave Jones <davej@...>, Chuck Wolber <chuckw@...>, Chris Wedgwood <reviews@...>, Michael Krufky <mkrufky@...>, Chuck Ebbert <cebbert@...>, Domenico Andreoli <cavokz@...>, <torvalds@...>, <akpm@...>, <alan@...>, James Bottomley <James.Bottomley@...>
Date: Tuesday, May 13, 2008 - 4:12 pm

2.6.25-stable review patch.  If anyone has any objections, please let us
know.

------------------
From: James Bottomley <James.Bottomley@HansenPartnership.com>

commit ad2fa42d044b98469449880474a9662fb689f7f9 upstream

Reported-by: Frank de Jong <frapex@xs4all.nl>

The driver is apparently returning 0 on failure and 1 on success.
That's a bit unfortunate.  Fix it by altering to -ENODEV and 0.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/scsi/aha152x.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/scsi/aha152x.c
+++ b/drivers/scsi/aha152x.c
@@ -3835,7 +3835,7 @@ static int __init aha152x_init(void)
 			iounmap(p);
 		}
 		if (!ok && setup_count == 0)
-			return 0;
+			return -ENODEV;
 
 		printk(KERN_INFO "aha152x: BIOS test: passed, ");
 #else
@@ -3914,7 +3914,7 @@ static int __init aha152x_init(void)
 #endif
 	}
 
-	return 1;
+	return 0;
 }
 
 static void __exit aha152x_exit(void)

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/37] 2.6.25.4 -stable review, Greg KH, (Tue May 13, 4:10 pm)
[patch 37/37] md: fix raid5 repair operations, Greg KH, (Tue May 13, 4:12 pm)
[patch 35/37] SCSI: aha152x: fix init suspiciously returned ..., Greg KH, (Tue May 13, 4:12 pm)
[patch 24/37] sparc: Fix ptrace() detach., Greg KH, (Tue May 13, 4:12 pm)
Re: Hardware designt to prevent Damages... [WAS: [patch 23/3..., Michelle Konzack, (Fri May 16, 11:22 am)
Re: Hardware designt to prevent Damages... [WAS: [patch 23/3..., linux-os (Dick Johnson), (Thu May 15, 1:57 pm)
Re: [patch 22/37] x86: sysfs cpu?/topology is empty in 2.6.2..., Vaidyanathan Srinivasan, (Thu May 15, 2:06 pm)
Re: [patch 20/37] {nfnetlink, ip, ip6}_queue: fix skb_over_p..., Gustavo Guillermo Perez, (Wed May 14, 12:45 pm)
[patch 06/37] sparc: sunzilog uart order, Greg KH, (Tue May 13, 4:11 pm)
speck-geostationary