diff options
| -rw-r--r-- | drivers/mtd/mtdcore.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index b1eea48c501d..a91cee90aef9 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, | |||
| 616 | * does cause problems with parse_mtd_partitions() above (e.g., | 616 | * does cause problems with parse_mtd_partitions() above (e.g., |
| 617 | * cmdlineparts will register partitions more than once). | 617 | * cmdlineparts will register partitions more than once). |
| 618 | */ | 618 | */ |
| 619 | WARN_ONCE(mtd->reboot_notifier.notifier_call, "MTD already registered\n"); | 619 | WARN_ONCE(mtd->_reboot && mtd->reboot_notifier.notifier_call, |
| 620 | "MTD already registered\n"); | ||
| 620 | if (mtd->_reboot && !mtd->reboot_notifier.notifier_call) { | 621 | if (mtd->_reboot && !mtd->reboot_notifier.notifier_call) { |
| 621 | mtd->reboot_notifier.notifier_call = mtd_reboot_notifier; | 622 | mtd->reboot_notifier.notifier_call = mtd_reboot_notifier; |
| 622 | register_reboot_notifier(&mtd->reboot_notifier); | 623 | register_reboot_notifier(&mtd->reboot_notifier); |
