From 86af10cac421e7156da4a5f154ab34026e35a2c3 Mon Sep 17 00:00:00 2001 From: Karl Beldan Date: Thu, 23 Sep 2010 10:46:31 +0200 Subject: [PATCH] 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 Cc: Stefan Roese Signed-off-by: Stefan Roese --- drivers/mtd/ubi/build.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 354e80b528e..3ea0e6c8d18 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; }