Skip to content

Commit

Permalink
[SCSI] aha152x: fix init suspiciously returned 1, it should follow 0/…
Browse files Browse the repository at this point in the history
…-E convention

Reported-by: Frank de Jong <frapex@xs4all.nl>
> [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.

Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
James Bottomley authored and James Bottomley committed May 11, 2008
1 parent c8611f9 commit ad2fa42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/aha152x.c
Original file line number Diff line number Diff line change
Expand Up @@ -3830,7 +3830,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
Expand Down Expand Up @@ -3909,7 +3909,7 @@ static int __init aha152x_init(void)
#endif
}

return 1;
return 0;
}

static void __exit aha152x_exit(void)
Expand Down

0 comments on commit ad2fa42

Please sign in to comment.