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