mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
Kernel: Add missing nothrow tag to DeviceManagement::try_create_device
Without this tag this method was essentially a must_create.
This commit is contained in:
parent
a0f404551e
commit
e729c3ae36
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ public:
|
||||||
template<typename DeviceType, typename... Args>
|
template<typename DeviceType, typename... Args>
|
||||||
static inline ErrorOr<NonnullRefPtr<DeviceType>> try_create_device(Args&&... args)
|
static inline ErrorOr<NonnullRefPtr<DeviceType>> try_create_device(Args&&... args)
|
||||||
{
|
{
|
||||||
auto device = TRY(adopt_nonnull_ref_or_enomem(new DeviceType(forward<Args>(args)...)));
|
auto device = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) DeviceType(forward<Args>(args)...)));
|
||||||
device->after_inserting();
|
device->after_inserting();
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue