]> Pileus Git - ~andy/linux/blobdiff - fs/file_table.c
fs: Preserve error code in get_empty_filp(), part 2
[~andy/linux] / fs / file_table.c
index cd76d4fdf4a497c5653267affd1e79bff250c791..aa07d3684a2e8e13bdf4ae36eb5dc0ba98641223 100644 (file)
@@ -173,7 +173,7 @@ struct file *alloc_file(struct path *path, fmode_t mode,
 
        file = get_empty_filp();
        if (IS_ERR(file))
-               return NULL;
+               return file;
 
        file->f_path = *path;
        file->f_mapping = path->dentry->d_inode->i_mapping;