]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: fix EFI_ENTRY point on get_active_pcr_banks
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Tue, 24 Oct 2023 15:43:53 +0000 (10:43 -0500)
committerIlias Apalodimas <ilias.apalodimas@linaro.org>
Fri, 27 Oct 2023 10:17:21 +0000 (13:17 +0300)
efi_tcg2_get_active_pcr_banks doesn't immediately call the
EFI_ENTRY() wrapper once it enters the function. Move the call a
few lines above to cover the error cases properly as well.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/efi_loader/efi_tcg2.c

index b87c7900a850622f0ca227e982881b456df0a530..2eaa12b83b1661bbda498b886f62a11f5c4b23e0 100644 (file)
@@ -717,16 +717,16 @@ efi_tcg2_get_active_pcr_banks(struct efi_tcg2_protocol *this,
        struct udevice *dev;
        efi_status_t ret;
 
+       EFI_ENTRY("%p, %p", this, active_pcr_banks);
+
        if (!this || !active_pcr_banks) {
                ret = EFI_INVALID_PARAMETER;
                goto out;
        }
-
        ret = tcg2_platform_get_tpm2(&dev);
        if (ret != EFI_SUCCESS)
                goto out;
 
-       EFI_ENTRY("%p, %p", this, active_pcr_banks);
        ret = tcg2_get_active_pcr_banks(dev, active_pcr_banks);
 
 out: