git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
967bf62
)
[PATCH] fix create_write_pipe() error check
author
Akinobu Mita
<akinobu.mita@gmail.com>
Tue, 28 Nov 2006 20:29:43 +0000
(12:29 -0800)
committer
Linus Torvalds
<torvalds@woody.osdl.org>
Wed, 29 Nov 2006 01:26:50 +0000
(17:26 -0800)
The return value of create_write_pipe()/create_read_pipe() should be
checked by IS_ERR().
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/kmod.c
patch
|
blob
|
history
diff --git
a/kernel/kmod.c
b/kernel/kmod.c
index
bb4e29d
..
2b76dee
100644
(file)
--- a/
kernel/kmod.c
+++ b/
kernel/kmod.c
@@
-307,14
+307,14
@@
int call_usermodehelper_pipe(char *path, char **argv, char **envp,
return 0;
f = create_write_pipe();
return 0;
f = create_write_pipe();
- if (
!f
)
- return
-ENOMEM
;
+ if (
IS_ERR(f)
)
+ return
PTR_ERR(f)
;
*filp = f;
f = create_read_pipe(f);
*filp = f;
f = create_read_pipe(f);
- if (
!f
) {
+ if (
IS_ERR(f)
) {
free_write_pipe(*filp);
free_write_pipe(*filp);
- return
-ENOMEM
;
+ return
PTR_ERR(f)
;
}
sub_info.stdin = f;
}
sub_info.stdin = f;