aboutsummaryrefslogtreecommitdiff
path: root/init/do_mounts.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/do_mounts.c')
-rw-r--r--init/do_mounts.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 3b7c1e4ddb1b..dea5de95c2dd 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -533,9 +533,13 @@ void __init mount_root(void)
}
#endif
#ifdef CONFIG_BLOCK
- if (create_dev("/dev/root", ROOT_DEV) < 0)
- pr_err("Failed to create %s device !\n", "/dev/root");
- 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
}