Commit f4c58c37 authored by Rijo Thomas's avatar Rijo Thomas Committed by Herbert Xu

tee: amdtee: print error message if tee not present

If there is no TEE with which the driver can communicate, then
print an error message and return.
Suggested-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarRijo Thomas <Rijo-john.Thomas@amd.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 5ae63958
......@@ -440,8 +440,10 @@ static int __init amdtee_driver_init(void)
int rc;
rc = psp_check_tee_status();
if (rc)
goto err_fail;
if (rc) {
pr_err("amd-tee driver: tee not present\n");
return rc;
}
drv_data = kzalloc(sizeof(*drv_data), GFP_KERNEL);
if (IS_ERR(drv_data))
......@@ -490,7 +492,6 @@ static int __init amdtee_driver_init(void)
kfree(drv_data);
drv_data = NULL;
err_fail:
pr_err("amd-tee driver initialization failed\n");
return rc;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment