diff options
author | Wolfgang Denk <wd@denx.de> | 2011-10-12 22:44:36 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-10-12 22:44:36 +0200 |
commit | f6d99aa9471bd5aa396d28bb3709162523cc4adb (patch) | |
tree | 5c3a3f5ac3ce6b072c0625f255c057ba7ee523ff | |
parent | e5a07171767115b446fb5070e9c0293fd1190c03 (diff) | |
parent | d63894654df72b010de2abb4b3f07d0d755f65b6 (diff) | |
download | u-boot-imx-f6d99aa9471bd5aa396d28bb3709162523cc4adb.zip u-boot-imx-f6d99aa9471bd5aa396d28bb3709162523cc4adb.tar.gz u-boot-imx-f6d99aa9471bd5aa396d28bb3709162523cc4adb.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-ubi
* 'master' of git://git.denx.de/u-boot-ubi:
UBI: init eba tables before wl when attaching a device
ubifs bad superblock bug
-rw-r--r-- | drivers/mtd/ubi/build.c | 12 | ||||
-rw-r--r-- | fs/ubifs/super.c | 6 |
2 files changed, 10 insertions, 8 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 3ea0e6c..d144ac2 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -476,21 +476,21 @@ static int attach_by_scanning(struct ubi_device *ubi) if (err) goto out_si; - err = ubi_wl_init_scan(ubi, si); - if (err) - goto out_vtbl; - err = ubi_eba_init_scan(ubi, si); if (err) goto out_wl; + err = ubi_wl_init_scan(ubi, si); + if (err) + goto out_vtbl; + ubi_scan_destroy_si(si); return 0; -out_wl: - ubi_wl_close(ubi); out_vtbl: vfree(ubi->vtbl); +out_wl: + ubi_wl_close(ubi); out_si: ubi_scan_destroy_si(si); return err; diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 63b2164..26b48f0 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -848,8 +848,10 @@ void ubifs_umount(struct ubifs_info *c) ubifs_debugging_exit(c); /* Finally free U-Boot's global copy of superblock */ - free(ubifs_sb->s_fs_info); - free(ubifs_sb); + if (ubifs_sb != NULL) { + free(ubifs_sb->s_fs_info); + free(ubifs_sb); + } } /** |