mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
Kernel: Make Device::after_inserting to return ErrorOr<void>
Instead of just returning nothing, let's return Error or nothing. This would help later on with error propagation in case of failure during this method. This also makes us more paranoid about failure in this method, so when initializing a DisplayConnector we safely tear down the internal members of the object. This applies the same for a StorageDevice object, but its after_inserting method is much smaller compared to the DisplayConnector overriden method.
This commit is contained in:
parent
15c0efede9
commit
25bb293629
9 changed files with 61 additions and 26 deletions
|
@ -35,7 +35,7 @@ UNMAP_AFTER_INIT PTYMultiplexer::~PTYMultiplexer() = default;
|
|||
|
||||
UNMAP_AFTER_INIT void PTYMultiplexer::initialize()
|
||||
{
|
||||
the().after_inserting();
|
||||
MUST(the().after_inserting());
|
||||
}
|
||||
|
||||
ErrorOr<NonnullLockRefPtr<OpenFileDescription>> PTYMultiplexer::open(int options)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue