Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
[firefly-linux-kernel-4.4.55.git] / fs / pipe.c
index 39baf6c3ebb0f3046ef8bc5939f391b062091925..64a494cef0a00be57d0800637b71caf2537c2694 100644 (file)
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -1037,13 +1037,13 @@ int create_pipe_files(struct file **res, int flags)
 
        err = -ENFILE;
        f = alloc_file(&path, FMODE_WRITE, &write_pipefifo_fops);
-       if (!f)
+       if (IS_ERR(f))
                goto err_dentry;
 
        f->f_flags = O_WRONLY | (flags & (O_NONBLOCK | O_DIRECT));
 
        res[0] = alloc_file(&path, FMODE_READ, &read_pipefifo_fops);
-       if (!res[0])
+       if (IS_ERR(res[0]))
                goto err_file;
 
        path_get(&path);