[zion] Use ErrorOr in PciConfiguration

This commit is contained in:
Drew Galbraith 2023-06-21 18:46:06 -07:00
parent 3a3ab8717b
commit c2dfe17363
4 changed files with 13 additions and 10 deletions

View file

@ -255,12 +255,10 @@ void ProbeRsdp() {
#endif
}
z_err_t GetPciExtendedConfiguration(uint64_t* base, uint64_t* offset) {
glcr::ErrorOr<PcieConfiguration> GetPciExtendedConfiguration() {
if (gPcieEcSize == 0) {
return glcr::NOT_FOUND;
}
*base = gPcieEcBase;
*offset = gPcieEcSize;
return glcr::OK;
return PcieConfiguration{gPcieEcBase, gPcieEcSize};
}