summaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/build.c
diff options
context:
space:
mode:
authorKarl Beldan <karl.beldan@gmail.com>2010-09-23 10:46:31 +0200
committerStefan Roese <sr@denx.de>2010-09-27 15:06:00 +0200
commit86af10cac421e7156da4a5f154ab34026e35a2c3 (patch)
tree017179e1327be124383fea9daa5e3d03329b8079 /drivers/mtd/ubi/build.c
parentd03161b455125f0581918b25fabc5fde0268ae4e (diff)
downloadu-boot-imx-86af10cac421e7156da4a5f154ab34026e35a2c3.zip
u-boot-imx-86af10cac421e7156da4a5f154ab34026e35a2c3.tar.gz
u-boot-imx-86af10cac421e7156da4a5f154ab34026e35a2c3.tar.bz2
Fix "ubi part" cmd re-entrancy
Commit 2ee951ba (UBI: Enable re-initializing of the "ubi part" command) reset mtd_devs in ubi_exit() but missed ubi_init()'s failure path. Signed-off-by: Karl Beldan <karl.beldan@gmail.com> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/mtd/ubi/build.c')
-rw-r--r--drivers/mtd/ubi/build.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 354e80b..3ea0e6c 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -1045,6 +1045,7 @@ out_version:
out_class:
class_destroy(ubi_class);
out:
+ mtd_devs = 0;
ubi_err("UBI error: cannot initialize UBI, error %d", err);
return err;
}