Kernel: Use TRY() in FileDescription::attach()

This commit is contained in:
Andreas Kling 2021-09-05 16:12:39 +02:00
parent aa4d5817af
commit abb43468dc
Notes: sideshowbarker 2024-07-18 04:42:24 +09:00

View file

@ -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);
}