commonlib/fsp_relocate: Fix pe_relocate() return value on success

Similarly to te_relocate(), on success pe_relocate() should return 0.
It has never been an issue so far as pe_relocate() return value is not
tested.

Change-Id: I8e531662952d12e1f0ffa34042dab778ea602bfc
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76891
Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Anil Kumar K <anil.kumar.k@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
This commit is contained in:
Jeremy Compostella 2023-08-02 16:59:03 -07:00 committed by Matt DeVillier
parent 1d3e6eba02
commit d86260a134
1 changed files with 1 additions and 1 deletions

View File

@ -275,7 +275,7 @@ static int pe_relocate(uintptr_t new_addr, void *pe, void *fsp, size_t fih_off)
img_base_off += delta; img_base_off += delta;
write_le32(&ophdr->ImageBase, img_base_off); write_le32(&ophdr->ImageBase, img_base_off);
return -1; return 0;
} }
static int te_relocate(uintptr_t new_addr, void *te) static int te_relocate(uintptr_t new_addr, void *te)