diff options
author | Stefano Babic <sbabic@denx.de> | 2012-12-08 12:02:45 +0100 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2012-12-08 12:02:45 +0100 |
commit | 05a860c228fe6c8f2e7aced8cc8ef88bc1038363 (patch) | |
tree | 764536da9202b9de387a0d957829f64dfba818b7 /fs/ext4/ext4_common.c | |
parent | 393ff47ba3123208f7c4f08d63f114300a41d0c4 (diff) | |
parent | fd4d564b3c80b111f18c93adb14233a6a7ddb0e9 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot into master
Conflicts:
drivers/power/power_fsl.c
include/configs/mx35pdk.h
include/configs/mx53loco.h
include/configs/woodburn_common.h
board/woodburn/woodburn.c
These boards still use the old old PMIC framework, so they
do not merge properly after the power framework was merged into
mainline.
Fix all conflicts and update woodburn to use Power Framework.
Signed-off-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'fs/ext4/ext4_common.c')
-rw-r--r-- | fs/ext4/ext4_common.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c index 323875fa945..f12b8056cc0 100644 --- a/fs/ext4/ext4_common.c +++ b/fs/ext4/ext4_common.c @@ -378,7 +378,6 @@ void ext4fs_update_parent_dentry(char *filename, int *p_ino, int file_type) struct ext_filesystem *fs = get_fs(); /* directory entry */ struct ext2_dirent *dir; - char *ptr = NULL; char *temp_dir = NULL; zero_buffer = zalloc(fs->blksz); @@ -415,7 +414,6 @@ restart: if (ext4fs_log_journal(root_first_block_buffer, first_block_no_of_root)) goto fail; dir = (struct ext2_dirent *)root_first_block_buffer; - ptr = (char *)dir; totalbytes = 0; while (dir->direntlen > 0) { /* @@ -483,14 +481,12 @@ restart: break; dir = (struct ext2_dirent *)((char *)dir + templength); - ptr = (char *)dir; } /* make a pointer ready for creating next directory entry */ templength = dir->direntlen; totalbytes = totalbytes + templength; dir = (struct ext2_dirent *)((char *)dir + templength); - ptr = (char *)dir; /* get the next available inode number */ inodeno = ext4fs_get_new_inode_no(); @@ -1200,6 +1196,11 @@ static void alloc_double_indirect_block(struct ext2_inode *file_inode, status = ext4fs_devread(di_blockno_parent * fs->sect_perblk, 0, fs->blksz, (char *)di_parent_buffer); + + if (!status) { + printf("%s: Device read error!\n", __func__); + goto fail; + } memset(di_parent_buffer, '\0', fs->blksz); /* @@ -1227,6 +1228,11 @@ static void alloc_double_indirect_block(struct ext2_inode *file_inode, fs->sect_perblk, 0, fs->blksz, (char *)di_child_buff); + + if (!status) { + printf("%s: Device read error!\n", __func__); + goto fail; + } memset(di_child_buff, '\0', fs->blksz); /* filling of actual datablocks for each child */ for (j = 0; j < (fs->blksz / sizeof(int)); j++) { |