diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/kmod.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c index bb4e29d924e..2b76dee2849 100644 --- 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(); - if (!f) - return -ENOMEM; + if (IS_ERR(f)) + return PTR_ERR(f); *filp = f; f = create_read_pipe(f); - if (!f) { + if (IS_ERR(f)) { free_write_pipe(*filp); - return -ENOMEM; + return PTR_ERR(f); } sub_info.stdin = f; |