summaryrefslogtreecommitdiff
path: root/mm/shmem.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-03-02 05:22:53 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-03-02 08:50:45 +0400
commit26567cdbbf1a6b13a92a82332daee00672aa48a9 (patch)
tree4f113bb2479fc52e0a734c8edc5645e8da3622e6 /mm/shmem.c
parentdd37978c50bc8b354e5c4633f69387f16572fdac (diff)
downloadlinux-26567cdbbf1a6b13a92a82332daee00672aa48a9.tar.xz
fix nommu breakage in shmem.c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r--mm/shmem.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index ed2befb4952e..1c44af71fcf5 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -2932,9 +2932,8 @@ struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags
inode->i_size = size;
clear_nlink(inode); /* It is unlinked */
#ifndef CONFIG_MMU
- error = ramfs_nommu_expand_for_mapping(inode, size);
- res = ERR_PTR(error);
- if (error)
+ res = ERR_PTR(ramfs_nommu_expand_for_mapping(inode, size));
+ if (IS_ERR(res))
goto put_dentry;
#endif