mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-12 09:20:36 +00:00
Kernel: Use TRY() in FileDescription::attach()
This commit is contained in:
parent
aa4d5817af
commit
abb43468dc
Notes:
sideshowbarker
2024-07-18 04:42:24 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/abb43468dcb
1 changed files with 2 additions and 5 deletions
|
@ -74,11 +74,8 @@ FileDescription::~FileDescription()
|
|||
|
||||
KResult FileDescription::attach()
|
||||
{
|
||||
if (m_inode) {
|
||||
auto result = m_inode->attach(*this);
|
||||
if (result.is_error())
|
||||
return result;
|
||||
}
|
||||
if (m_inode)
|
||||
TRY(m_inode->attach(*this));
|
||||
return m_file->attach(*this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue