diff options
author | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2023-10-24 10:43:53 -0500 |
---|---|---|
committer | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2023-10-27 13:17:21 +0300 |
commit | e9fc018a558ea931e599453e925d6cb5690112cb (patch) | |
tree | 4dd2196de6e9c6e43522a5dc771e8785a3b4d6cd /lib | |
parent | 450afc350cd306e800f97baee0fbcaa0d1e8df80 (diff) |
efi_loader: fix EFI_ENTRY point on get_active_pcr_banks
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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_tcg2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c index b87c7900a8..2eaa12b83b 100644 --- a/lib/efi_loader/efi_tcg2.c +++ b/lib/efi_loader/efi_tcg2.c @@ -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: |