summaryrefslogtreecommitdiffstats
path: root/kernel/init/do_mounts.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/init/do_mounts.c')
-rw-r--r--kernel/init/do_mounts.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/init/do_mounts.c b/kernel/init/do_mounts.c
index a95bbdb2a..dea5de95c 100644
--- a/kernel/init/do_mounts.c
+++ b/kernel/init/do_mounts.c
@@ -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
}