From: James Bottomley Date: Tue, 13 May 2008 19:10:24 +0000 (+0000) Subject: SCSI: aha152x: fix init suspiciously returned 1, it should follow 0/-E convention X-Git-Tag: v2.6.25.4~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cbde20dcd3ea3df46ac545d59fc4da6b1e9487a;p=thirdparty%2Fkernel%2Fstable.git SCSI: aha152x: fix init suspiciously returned 1, it should follow 0/-E convention commit ad2fa42d044b98469449880474a9662fb689f7f9 upstream Reported-by: Frank de Jong > [1.] One line summary of the problem: > linux-2.6.25.3, aha152x'->init suspiciously returned 1, it should > follow 0/-E convention. The module / driver works okay. Unloading the > module is impossible. 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index 660b88f416481..d9bc8591a874c 100644 --- 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)