summaryrefslogtreecommitdiff
path: root/fs/squashfs/sqfs_inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/squashfs/sqfs_inode.c')
-rw-r--r--fs/squashfs/sqfs_inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/squashfs/sqfs_inode.c b/fs/squashfs/sqfs_inode.c
index 1368f3063c..14d70cf678 100644
--- a/fs/squashfs/sqfs_inode.c
+++ b/fs/squashfs/sqfs_inode.c
@@ -141,9 +141,9 @@ int sqfs_read_metablock(unsigned char *file_mapping, int offset,
const unsigned char *data;
u16 header;
- data = file_mapping + offset;
- if (!data)
+ if (!file_mapping)
return -EFAULT;
+ data = file_mapping + offset;
header = get_unaligned((u16 *)data);
if (!header)