Kernel: Propagate HIDManagement initialisation error to init

Initialisation errors for HIDManagement are now returned to the init. In
the init we assert by MUST if we get an error.
This commit is contained in:
Lorenz Steinert 2022-02-23 22:14:09 +01:00 committed by Andreas Kling
commit 78f8821152
Notes: sideshowbarker 2024-07-17 16:38:26 +09:00
4 changed files with 4 additions and 7 deletions

View file

@ -137,12 +137,11 @@ UNMAP_AFTER_INIT ErrorOr<void> HIDManagement::enumerate()
return {};
}
UNMAP_AFTER_INIT void HIDManagement::initialize()
UNMAP_AFTER_INIT ErrorOr<void> HIDManagement::initialize()
{
VERIFY(!s_the.is_initialized());
s_the.ensure_instance();
// FIXME: Propagate errors back to init to deal with them.
MUST(s_the->enumerate());
return s_the->enumerate();
}
HIDManagement& HIDManagement::the()