UPSTREAM: power_supply: fix return value of get_property
[firefly-linux-kernel-4.4.55.git] / init / do_mounts.c
index a95bbdb2a50232224eb64c5331123701ea7c2416..1902a1c808319f6e84aa13944ba44ede13a9b02e 100644 (file)
@@ -533,8 +533,13 @@ void __init mount_root(void)
        }
 #endif
 #ifdef CONFIG_BLOCK
-       create_dev("/dev/root", ROOT_DEV);
-       mount_block_root("/dev/root", root_mountflags);
+       {
+               int err = create_dev("/dev/root", ROOT_DEV);
+
+               if (err < 0)
+                       pr_emerg("Failed to create /dev/root: %d\n", err);
+               mount_block_root("/dev/root", root_mountflags);
+       }
 #endif
 }
 
@@ -561,6 +566,7 @@ void __init prepare_namespace(void)
        wait_for_device_probe();
 
        md_run_setup();
+       dm_run_setup();
 
        if (saved_root_name[0]) {
                root_device_name = saved_root_name;