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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Mar 2022 18:12:42 +0000 (19:12 +0100)
commite64d6a689ec55c6d7ba49c0160669df7b474b216
tree8ddb006f7d3dcbdd079cec0af6a57f26f5fd8b5c
parent6c3d4da8e7a9b2aef0f538f79e4ee2ca084a09c8
riscv/efi_stub: Fix get_boot_hartid_from_fdt() return value

commit dcf0c838854c86e1f41fb1934aea906845d69782 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/efi/libstub/riscv-stub.c