diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/ext4_common.c | 3 | ||||
-rw-r--r-- | fs/yaffs2/yaffs_guts.c | 4 | ||||
-rw-r--r-- | fs/yaffs2/yaffsfs.c | 9 |
3 files changed, 7 insertions, 9 deletions
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c index dac9545365..e3cc30a1e0 100644 --- a/fs/ext4/ext4_common.c +++ b/fs/ext4/ext4_common.c @@ -2343,7 +2343,7 @@ int ext4fs_mount(unsigned part_length) /* Make sure this is an ext2 filesystem. */ if (le16_to_cpu(data->sblock.magic) != EXT2_MAGIC) - goto fail; + goto fail_noerr; if (le32_to_cpu(data->sblock.revision_level) == 0) { @@ -2379,6 +2379,7 @@ int ext4fs_mount(unsigned part_length) return 1; fail: printf("Failed to mount ext2 filesystem...\n"); +fail_noerr: free(data); ext4fs_root = NULL; diff --git a/fs/yaffs2/yaffs_guts.c b/fs/yaffs2/yaffs_guts.c index bbe0d700fb..c8b27adda9 100644 --- a/fs/yaffs2/yaffs_guts.c +++ b/fs/yaffs2/yaffs_guts.c @@ -1872,8 +1872,8 @@ static int yaffs_new_obj_id(struct yaffs_dev *dev) n += YAFFS_NOBJECT_BUCKETS; list_for_each(i, &dev->obj_bucket[bucket].list) { /* If there is already one in the list */ - if (i && list_entry(i, struct yaffs_obj, - hash_link)->obj_id == n) { + if (list_entry(i, struct yaffs_obj, + hash_link)->obj_id == n) { found = 0; break; } diff --git a/fs/yaffs2/yaffsfs.c b/fs/yaffs2/yaffsfs.c index ba76a5ccdb..47abc6beda 100644 --- a/fs/yaffs2/yaffsfs.c +++ b/fs/yaffs2/yaffsfs.c @@ -2847,12 +2847,9 @@ static void yaffsfs_RemoveObjectCallback(struct yaffs_obj *obj) * the next one to prevent a hanging ptr. */ list_for_each(i, &search_contexts) { - if (i) { - dsc = list_entry(i, struct yaffsfs_DirSearchContxt, - others); - if (dsc->nextReturn == obj) - yaffsfs_DirAdvance(dsc); - } + dsc = list_entry(i, struct yaffsfs_DirSearchContxt, others); + if (dsc->nextReturn == obj) + yaffsfs_DirAdvance(dsc); } } |