All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] efi_loader: Clean up tcg2 once in case of failure
@ 2021-05-10 18:15 Ilias Apalodimas
  2021-05-11  6:27 ` Heinrich Schuchardt
  0 siblings, 1 reply; 2+ messages in thread
From: Ilias Apalodimas @ 2021-05-10 18:15 UTC (permalink / raw)
  To: u-boot

efi_init_event_log() calls tcg2_uninit() in case of failure.
We can skip that since the function is called on efi_tcg2_register()
which also cleans up if an error occurs

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
 lib/efi_loader/efi_tcg2.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c
index 94e8f22bbb69..570cc746ed4e 100644
--- a/lib/efi_loader/efi_tcg2.c
+++ b/lib/efi_loader/efi_tcg2.c
@@ -1053,12 +1053,8 @@ static efi_status_t efi_init_event_log(void)
 	event_log.last_event_size = event_log.pos;
 
 	ret = create_final_event();
-	if (ret != EFI_SUCCESS)
-		goto out;
 
-	return EFI_SUCCESS;
 out:
-	tcg2_uninit();
 	return ret;
 }
 
-- 
2.31.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] efi_loader: Clean up tcg2 once in case of failure
  2021-05-10 18:15 [PATCH] efi_loader: Clean up tcg2 once in case of failure Ilias Apalodimas
@ 2021-05-11  6:27 ` Heinrich Schuchardt
  0 siblings, 0 replies; 2+ messages in thread
From: Heinrich Schuchardt @ 2021-05-11  6:27 UTC (permalink / raw)
  To: u-boot

On 5/10/21 8:15 PM, Ilias Apalodimas wrote:
> efi_init_event_log() calls tcg2_uninit() in case of failure.
> We can skip that since the function is called on efi_tcg2_register()
> which also cleans up if an error occurs
>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
>   lib/efi_loader/efi_tcg2.c | 4 ----
>   1 file changed, 4 deletions(-)
>
> diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c
> index 94e8f22bbb69..570cc746ed4e 100644
> --- a/lib/efi_loader/efi_tcg2.c
> +++ b/lib/efi_loader/efi_tcg2.c
> @@ -1053,12 +1053,8 @@ static efi_status_t efi_init_event_log(void)
>   	event_log.last_event_size = event_log.pos;
>
>   	ret = create_final_event();
> -	if (ret != EFI_SUCCESS)
> -		goto out;
>
> -	return EFI_SUCCESS;
>   out:
> -	tcg2_uninit();
>   	return ret;
>   }
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-11  6:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 18:15 [PATCH] efi_loader: Clean up tcg2 once in case of failure Ilias Apalodimas
2021-05-11  6:27 ` 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.