* [PATCH] efi_loader: capsule: return a corret error code at find_boot_device()
@ 2021-04-20 1:03 AKASHI Takahiro
2021-04-20 6:17 ` Heinrich Schuchardt
0 siblings, 1 reply; 2+ messages in thread
From: AKASHI Takahiro @ 2021-04-20 1:03 UTC (permalink / raw)
To: u-boot
In case of failure at efi_get_variable_int("BootOrder"), we should
skip examining boot option variables and return an appropriate error
code which is the one the function returned.
Fixes: CID 331153 Code maintainability issues (UNUSED_VALUE)
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
lib/efi_loader/efi_capsule.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
index 691eda5e0d14..2d10f47bff24 100644
--- a/lib/efi_loader/efi_capsule.c
+++ b/lib/efi_loader/efi_capsule.c
@@ -685,7 +685,6 @@ skip:
efi_free_pool(boot_dev);
boot_dev = NULL;
}
-out:
if (boot_dev) {
u16 *path_str;
@@ -703,6 +702,7 @@ out:
} else {
ret = EFI_NOT_FOUND;
}
+out:
free(boot_order);
return ret;
--
2.31.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] efi_loader: capsule: return a corret error code at find_boot_device()
2021-04-20 1:03 [PATCH] efi_loader: capsule: return a corret error code at find_boot_device() AKASHI Takahiro
@ 2021-04-20 6:17 ` Heinrich Schuchardt
0 siblings, 0 replies; 2+ messages in thread
From: Heinrich Schuchardt @ 2021-04-20 6:17 UTC (permalink / raw)
To: u-boot
On 4/20/21 3:03 AM, AKASHI Takahiro wrote:
> In case of failure at efi_get_variable_int("BootOrder"), we should
> skip examining boot option variables and return an appropriate error
> code which is the one the function returned.
>
> Fixes: CID 331153 Code maintainability issues (UNUSED_VALUE)
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> lib/efi_loader/efi_capsule.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
> index 691eda5e0d14..2d10f47bff24 100644
> --- a/lib/efi_loader/efi_capsule.c
> +++ b/lib/efi_loader/efi_capsule.c
> @@ -685,7 +685,6 @@ skip:
> efi_free_pool(boot_dev);
> boot_dev = NULL;
> }
> -out:
> if (boot_dev) {
> u16 *path_str;
>
> @@ -703,6 +702,7 @@ out:
> } else {
> ret = EFI_NOT_FOUND;
> }
> +out:
> free(boot_order);
>
> return ret;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-20 6:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 1:03 [PATCH] efi_loader: capsule: return a corret error code at find_boot_device() AKASHI Takahiro
2021-04-20 6:17 ` Heinrich Schuchardt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.