[PATCH 1/1] efi_loader: use EFI_EXIT in efi_riscv_get_boot_hartid

After calling EFI_ENTRY we have to call EFI_EXIT before returning.
Add a missing EFI_EXIT().
Fixes: 1ccf87165e38 ("efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support") Reported-by: Dave Jones dave.jones@canonical.com Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- lib/efi_loader/efi_riscv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/efi_loader/efi_riscv.c b/lib/efi_loader/efi_riscv.c index bccfefd8fb..064172755b 100644 --- a/lib/efi_loader/efi_riscv.c +++ b/lib/efi_loader/efi_riscv.c @@ -31,7 +31,7 @@ efi_riscv_get_boot_hartid(struct riscv_efi_boot_protocol *this, EFI_ENTRY("%p, %p", this, boot_hartid);
if (this != &riscv_efi_boot_prot || !boot_hartid) - return EFI_INVALID_PARAMETER; + return EFI_EXIT(EFI_INVALID_PARAMETER);
*boot_hartid = gd->arch.boot_hart;

On Wed, Jan 11, 2023 at 07:13:01PM +0100, Heinrich Schuchardt wrote:
After calling EFI_ENTRY we have to call EFI_EXIT before returning.
Add a missing EFI_EXIT().
Fixes: 1ccf87165e38 ("efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support") Reported-by: Dave Jones dave.jones@canonical.com Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
lib/efi_loader/efi_riscv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/efi_loader/efi_riscv.c b/lib/efi_loader/efi_riscv.c index bccfefd8fb..064172755b 100644 --- a/lib/efi_loader/efi_riscv.c +++ b/lib/efi_loader/efi_riscv.c @@ -31,7 +31,7 @@ efi_riscv_get_boot_hartid(struct riscv_efi_boot_protocol *this, EFI_ENTRY("%p, %p", this, boot_hartid);
if (this != &riscv_efi_boot_prot || !boot_hartid)
return EFI_INVALID_PARAMETER;
return EFI_EXIT(EFI_INVALID_PARAMETER);
*boot_hartid = gd->arch.boot_hart;
-- 2.37.2
Reviewed-by: Ilias Apalodimas ilias.apalodimas@linaro.org

On Wed, Jan 11, 2023 at 07:13:01PM +0100, Heinrich Schuchardt wrote:
After calling EFI_ENTRY we have to call EFI_EXIT before returning.
Add a missing EFI_EXIT().
Fixes: 1ccf87165e38 ("efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support") Reported-by: Dave Jones dave.jones@canonical.com Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
lib/efi_loader/efi_riscv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/efi_loader/efi_riscv.c b/lib/efi_loader/efi_riscv.c index bccfefd8fb..064172755b 100644 --- a/lib/efi_loader/efi_riscv.c +++ b/lib/efi_loader/efi_riscv.c @@ -31,7 +31,7 @@ efi_riscv_get_boot_hartid(struct riscv_efi_boot_protocol *this, EFI_ENTRY("%p, %p", this, boot_hartid);
if (this != &riscv_efi_boot_prot || !boot_hartid)
return EFI_INVALID_PARAMETER;
return EFI_EXIT(EFI_INVALID_PARAMETER);
*boot_hartid = gd->arch.boot_hart;
Reviewed-by: Sunil V L sunilvl@ventanamicro.com
-- 2.37.2
participants (3)
-
Heinrich Schuchardt
-
Ilias Apalodimas
-
Sunil V L