efi/fdt: fix panic when no valid fdt found
authorChangbin Du <changbin.du@gmail.com>
Wed, 24 Mar 2021 14:54:35 +0000 (22:54 +0800)
committerArd Biesheuvel <ardb@kernel.org>
Sat, 22 May 2021 12:03:42 +0000 (14:03 +0200)
commit668a84c1bfb2b3fd5a10847825a854d63fac7baa
treed597578371f536323f7354d4a5e731b7334888b2
parent6efb943b8616ec53a5e444193dccf1af9ad627b5
efi/fdt: fix panic when no valid fdt found

setup_arch() would invoke efi_init()->efi_get_fdt_params(). If no
valid fdt found then initial_boot_params will be null. So we
should stop further fdt processing here. I encountered this
issue on risc-v.

Signed-off-by: Changbin Du <changbin.du@gmail.com>
Fixes: b91540d52a08b ("RISC-V: Add EFI runtime services")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/fdtparams.c