aboutsummaryrefslogtreecommitdiff
path: root/cmd/tpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/tpm.c')
-rw-r--r--cmd/tpm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/tpm.c b/cmd/tpm.c
index add6bfb416e..6edf3e9dc35 100644
--- a/cmd/tpm.c
+++ b/cmd/tpm.c
@@ -448,7 +448,7 @@ static int get_tpm(struct udevice **devp)
int rc;
rc = uclass_first_device(UCLASS_TPM, devp);
- if (rc) {
+ if (rc || !*devp) {
printf("Could not find TPM (ret=%d)\n", rc);
return CMD_RET_FAILURE;
}