From e729c3ae36e082817a5f61c269e347f12de506bc Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Wed, 26 Jan 2022 21:59:13 +0200 Subject: [PATCH] Kernel: Add missing nothrow tag to DeviceManagement::try_create_device Without this tag this method was essentially a must_create. --- Kernel/Devices/DeviceManagement.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Devices/DeviceManagement.h b/Kernel/Devices/DeviceManagement.h index a16181c57b..c1d6b18791 100644 --- a/Kernel/Devices/DeviceManagement.h +++ b/Kernel/Devices/DeviceManagement.h @@ -59,7 +59,7 @@ public: template static inline ErrorOr> try_create_device(Args&&... args) { - auto device = TRY(adopt_nonnull_ref_or_enomem(new DeviceType(forward(args)...))); + auto device = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) DeviceType(forward(args)...))); device->after_inserting(); return device; }