--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
-@@ -41,6 +41,7 @@
+@@ -27,6 +27,7 @@
#include <linux/reboot.h>
#include <linux/leds.h>
#include <linux/debugfs.h>
+#include <linux/root_dev.h>
+ #include <linux/nvmem-provider.h>
#include <linux/mtd/mtd.h>
- #include <linux/mtd/partitions.h>
-@@ -593,6 +594,15 @@ int add_mtd_device(struct mtd_info *mtd)
+@@ -698,6 +699,15 @@ int add_mtd_device(struct mtd_info *mtd)
of this try_ nonsense, and no bitching about it
either. :) */
__module_get(THIS_MODULE);
+
return 0;
- fail_added:
+ fail_nvmem_add: