From d86260a134575b083f35103e1cd5c7c7ad883bce Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Wed, 2 Aug 2023 16:59:03 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76891 Reviewed-by: Pratikkumar V Prajapati Reviewed-by: Paul Menzel Reviewed-by: Anil Kumar K Tested-by: build bot (Jenkins) Reviewed-by: Sridhar Siricilla Reviewed-by: Elyes Haouas --- src/commonlib/fsp_relocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/commonlib/fsp_relocate.c b/src/commonlib/fsp_relocate.c index c7c4b5a9ef..379930b22b 100644 --- a/src/commonlib/fsp_relocate.c +++ b/src/commonlib/fsp_relocate.c @@ -275,7 +275,7 @@ static int pe_relocate(uintptr_t new_addr, void *pe, void *fsp, size_t fih_off) img_base_off += delta; write_le32(&ophdr->ImageBase, img_base_off); - return -1; + return 0; } static int te_relocate(uintptr_t new_addr, void *te) -- cgit v1.2.3