diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index b1eea48c501d11cdb58e862ac73a0b29eb015aba..a91cee90aef9e8d5793cc064d501324ea2c5e45d 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -616,7 +616,8 @@ int mtd_device_parse_register(struct mtd_info *mtd, const char * const *types, * does cause problems with parse_mtd_partitions() above (e.g., * cmdlineparts will register partitions more than once). */ - WARN_ONCE(mtd->reboot_notifier.notifier_call, "MTD already registered\n"); + WARN_ONCE(mtd->_reboot && mtd->reboot_notifier.notifier_call, + "MTD already registered\n"); if (mtd->_reboot && !mtd->reboot_notifier.notifier_call) { mtd->reboot_notifier.notifier_call = mtd_reboot_notifier; register_reboot_notifier(&mtd->reboot_notifier);