aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2011-10-12 22:44:36 +0200
committerWolfgang Denk <wd@denx.de>2011-10-12 22:44:36 +0200
commitf6d99aa9471bd5aa396d28bb3709162523cc4adb (patch)
tree5c3a3f5ac3ce6b072c0625f255c057ba7ee523ff /drivers
parente5a07171767115b446fb5070e9c0293fd1190c03 (diff)
parentd63894654df72b010de2abb4b3f07d0d755f65b6 (diff)
downloadu-boot-f6d99aa9471bd5aa396d28bb3709162523cc4adb.zip
u-boot-f6d99aa9471bd5aa396d28bb3709162523cc4adb.tar.gz
u-boot-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
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/ubi/build.c12
1 files changed, 6 insertions, 6 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;