]> git.dujemihanovic.xyz Git - u-boot.git/commit
tpm: call tpm_tis_wait_init() after tpm_tis_init()
authorLukas Funke <lukas.funke@weidmueller.com>
Wed, 24 Jul 2024 07:34:47 +0000 (09:34 +0200)
committerIlias Apalodimas <ilias.apalodimas@linaro.org>
Tue, 6 Aug 2024 11:01:14 +0000 (14:01 +0300)
commitc686b38db8f84e5537b8371ac59a5b364662eda4
tree3a9442e6be8b99b910823d63046b0bdefe474cd1
parent6f4c31c2b658358628b5b0fa801f55c7477c7585
tpm: call tpm_tis_wait_init() after tpm_tis_init()

tpm_tis_wait_init() is using the 'chip->timeout_b' field which is
initialized in tpm_tis_init(). However, the init-function is called
*after* tpm_tis_wait_init() introducing an uninitalized field access.

This commit switches both routines.

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
[Ilias removed unusged 'chip' definition in tpm_tis_spi_probe()]
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Fixes: a5c30c26b28 ("tpm: Use the new API on tpm2 spi driver")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
drivers/tpm/tpm2_tis_core.c
drivers/tpm/tpm2_tis_spi.c