diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-07-24 15:26:04 +0200 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2024-07-31 08:29:58 +0200 |
commit | 48940c6429c3f77c04b1844e0cfed2f884bf045b (patch) | |
tree | 81667d6659beeca806facdc0ae20e0f7e227d6c0 | |
parent | 93767c5a8f7b1a6d22eb551e3b98f22eebe54d64 (diff) | |
download | u-boot-48940c6429c3f77c04b1844e0cfed2f884bf045b.tar.gz u-boot-48940c6429c3f77c04b1844e0cfed2f884bf045b.tar.bz2 u-boot-48940c6429c3f77c04b1844e0cfed2f884bf045b.zip |
efi_loader: correct check in efi_load_option_dp_join()
After assigning to *dp we must check this value and not dp.
Addresses-Coverity-ID: 501792 Control flow issues (DEADCODE)
Fixes: 58bef195f94e ("cmd: eficonfig: add support for setting fdt")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
-rw-r--r-- | lib/efi_loader/efi_helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c index 348612c3da..65d2116381 100644 --- a/lib/efi_loader/efi_helper.c +++ b/lib/efi_loader/efi_helper.c @@ -133,7 +133,7 @@ efi_status_t efi_load_option_dp_join(struct efi_device_path **dp, *dp = efi_dp_concat(tmp_dp, fdt_dp, *dp_size); efi_free_pool(tmp_dp); - if (!dp) + if (!*dp) return EFI_OUT_OF_RESOURCES; *dp_size += efi_dp_size(fdt_dp) + sizeof(END); } |