Kernel: Allow ReturnOp in global scope

This commit is contained in:
Bananymous 2025-08-14 19:03:27 +03:00
parent d128f4d70b
commit ce262a5d2d
1 changed files with 6 additions and 5 deletions

View File

@ -1876,11 +1876,12 @@ namespace Kernel::ACPI::AML
}
auto [execution_flow, node] = parse_result.release_value();
if (execution_flow != ExecutionFlow::Normal)
{
dwarnln("Scope got execution flow {}", static_cast<int>(execution_flow));
return BAN::Error::from_errno(EINVAL);
}
if (execution_flow == ExecutionFlow::Normal)
continue;
if (execution_flow == ExecutionFlow::Return)
break;
dwarnln("Scope got execution flow {}", static_cast<int>(execution_flow));
return BAN::Error::from_errno(EINVAL);
}
return {};