mtd: fixup corner case error handling in mtd_device_parse_register()
authorBrian Norris <computersforpeace@gmail.com>
Mon, 1 Jun 2015 23:17:19 +0000 (16:17 -0700)
committerBrian Norris <computersforpeace@gmail.com>
Mon, 26 Oct 2015 21:32:33 +0000 (14:32 -0700)
commit3e00ed0e984bbec47f5e531bad3cf36885aa5d83
treef31e2ddcc7b34b98860ff7426458a52dd8b37537
parentaf30c0a00aa0d086a820c2ec75544c07611834d7
mtd: fixup corner case error handling in mtd_device_parse_register()

Since commit 3efe41be224c ("mtd: implement common reboot notifier
boilerplate"), we might try to register a reboot notifier for an MTD
that failed to register. Let's avoid this by making the error path
clearer.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Richard Weinberger <richard@nod.at>
drivers/mtd/mtdcore.c