mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 19:15:07 +00:00
Kernel: Use TRY() in FileDescription::attach()
This commit is contained in:
parent
aa4d5817af
commit
abb43468dc
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…
Add table
Add a link
Reference in a new issue