summaryrefslogtreecommitdiff
path: root/fs/squashfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/squashfs')
-rw-r--r--fs/squashfs/namei.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/squashfs/namei.c b/fs/squashfs/namei.c
index f866d42a8b6f..342a5aa5a0e4 100644
--- a/fs/squashfs/namei.c
+++ b/fs/squashfs/namei.c
@@ -104,10 +104,8 @@ static int get_dir_index_using_name(struct super_block *sb,
size = le32_to_cpu(index->size) + 1;
- if (size > SQUASHFS_NAME_LEN) {
- err = -EINVAL;
+ if (size > SQUASHFS_NAME_LEN)
break;
- }
err = squashfs_read_metadata(sb, index->name, &index_start,
&index_offset, size);