From: Cornelia Huck Date: Tue, 11 Apr 2006 05:53:45 +0000 (-0700) Subject: [PATCH] s390: wrong return codes in cio_ignore_proc_init() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a7fbf6bba7f1f0616b0223a8b1cba91fffe607f5;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [PATCH] s390: wrong return codes in cio_ignore_proc_init() cio_ignore_proc_init() returns 1 in case of success and 0 in case of failure. The caller tests for != 0, so better return 0 in case of success and -ENOENT in case of failure. Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c index cb8e2e672b68..0960bef7b199 100644 --- a/drivers/s390/cio/blacklist.c +++ b/drivers/s390/cio/blacklist.c @@ -414,11 +414,11 @@ cio_ignore_proc_init (void) entry = create_proc_entry ("cio_ignore", S_IFREG | S_IRUGO | S_IWUSR, &proc_root); if (!entry) - return 0; + return -ENOENT; entry->proc_fops = &cio_ignore_proc_fops; - return 1; + return 0; } __initcall (cio_ignore_proc_init);