summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/mount.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-06 10:47:47 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-06 13:06:05 +0200
commit788b91a65cd8cea0d7a4899c5df1cc8a1c732640 (patch)
tree42f087b22ca401faa3801b1c0970f0ba18db1d13 /Kernel/Syscalls/mount.cpp
parentefe4e230ee60b16356359220d749b96c65a4ed6f (diff)
downloadserenity-788b91a65cd8cea0d7a4899c5df1cc8a1c732640.zip
Kernel: Tidy up DevFS construction and handle OOM errorso
- Use KResultOr and TRY() to propagate errors - Check for OOM - Move allocations out of the DevFS constructor
Diffstat (limited to 'Kernel/Syscalls/mount.cpp')
-rw-r--r--Kernel/Syscalls/mount.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/mount.cpp b/Kernel/Syscalls/mount.cpp
index c8f219bf5b..e302df3bff 100644
--- a/Kernel/Syscalls/mount.cpp
+++ b/Kernel/Syscalls/mount.cpp
@@ -83,7 +83,7 @@ KResultOr<FlatPtr> Process::sys$mount(Userspace<const Syscall::SC_mount_params*>
} else if (fs_type == "devpts"sv || fs_type == "DevPtsFS"sv) {
fs = TRY(DevPtsFS::try_create());
} else if (fs_type == "dev"sv || fs_type == "DevFS"sv) {
- fs = DevFS::create();
+ fs = TRY(DevFS::try_create());
} else if (fs_type == "sys"sv || fs_type == "SysFS"sv) {
fs = SysFS::create();
} else if (fs_type == "tmp"sv || fs_type == "TmpFS"sv) {