Skip to content

Commit 86af10c

Browse files
kbeldanstroese
authored andcommitted
Fix "ubi part" cmd re-entrancy
Commit 2ee951b (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>
1 parent d03161b commit 86af10c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/mtd/ubi/build.c

+1
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,7 @@ int __init ubi_init(void)
10451045
out_class:
10461046
class_destroy(ubi_class);
10471047
out:
1048+
mtd_devs = 0;
10481049
ubi_err("UBI error: cannot initialize UBI, error %d", err);
10491050
return err;
10501051
}

0 commit comments

Comments
 (0)