riscv/efi_stub: Fix get_boot_hartid_from_fdt() return value
authorSunil V L <sunilvl@ventanamicro.com>
Fri, 28 Jan 2022 04:50:04 +0000 (10:20 +0530)
committerArd Biesheuvel <ardb@kernel.org>
Thu, 17 Feb 2022 19:50:07 +0000 (20:50 +0100)
commit1e9e574abaea04b78913ef887d79038ba5d1d2e8
tree4427299d9fc6fb81043163fb1516d28e9be20bb9
parente783362eb54cd99b2cac8b3a9aeac942e6f6ac07
riscv/efi_stub: Fix get_boot_hartid_from_fdt() return value

The get_boot_hartid_from_fdt() function currently returns U32_MAX
for failure case which is not correct because U32_MAX is a valid
hartid value. This patch fixes the issue by returning error code.

Cc: <stable@vger.kernel.org>
Fixes: d7071743db31 ("RISC-V: Add EFI stub support.")
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/riscv-stub.c