]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: Clean up tcg2 once in case of failure
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Mon, 10 May 2021 18:15:08 +0000 (21:15 +0300)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Tue, 18 May 2021 10:36:12 +0000 (12:36 +0200)
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

index 06e97b0b270553b91b66c6f1c9a8252add95f244..40c94ab1333a3a9f06e552163e00835213d9bf9c 100644 (file)
@@ -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;
 }