diff options
author | Christophe Ricard <christophe.ricard@gmail.com> | 2016-01-21 23:19:13 +0100 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-01-28 21:01:22 -0700 |
commit | 0e37d4c2c631b0e94b7e891a5b37650d9bbd143c (patch) | |
tree | a956c2811e69307134194cb04da0d074d8fcea2a /lib/tpm.c | |
parent | 3faf2216d9649e2a22e6728194e9797cb46db933 (diff) | |
download | u-boot-imx-0e37d4c2c631b0e94b7e891a5b37650d9bbd143c.zip u-boot-imx-0e37d4c2c631b0e94b7e891a5b37650d9bbd143c.tar.gz u-boot-imx-0e37d4c2c631b0e94b7e891a5b37650d9bbd143c.tar.bz2 |
tpm: Fix fault in case CONFIG_DM_TPM is set without any TPM
In case CONFIG_DM_TPM was set without any TPM chipset configured a fault
was generated (NULL pointer access).
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Diffstat (limited to 'lib/tpm.c')
-rw-r--r-- | lib/tpm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -262,7 +262,7 @@ int tpm_init(void) struct udevice *dev; err = uclass_first_device(UCLASS_TPM, &dev); - if (err) + if (err || !dev) return err; return tpm_open(dev); } |