Skip to content

Commit

Permalink
[PATCH] s390: wrong return codes in cio_ignore_proc_init()
Browse files Browse the repository at this point in the history
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 <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Cornelia Huck authored and Linus Torvalds committed Apr 11, 2006
1 parent da074d0 commit a7fbf6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/s390/cio/blacklist.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a7fbf6b

Please sign in to comment.