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: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Rijo Thomas <Rijo-john.Thomas@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
5ae63958a6
commit
f4c58c3758
|
@ -440,8 +440,10 @@ static int __init amdtee_driver_init(void)
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = psp_check_tee_status();
|
rc = psp_check_tee_status();
|
||||||
if (rc)
|
if (rc) {
|
||||||
goto err_fail;
|
pr_err("amd-tee driver: tee not present\n");
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
drv_data = kzalloc(sizeof(*drv_data), GFP_KERNEL);
|
drv_data = kzalloc(sizeof(*drv_data), GFP_KERNEL);
|
||||||
if (IS_ERR(drv_data))
|
if (IS_ERR(drv_data))
|
||||||
|
@ -490,7 +492,6 @@ err_kfree_drv_data:
|
||||||
kfree(drv_data);
|
kfree(drv_data);
|
||||||
drv_data = NULL;
|
drv_data = NULL;
|
||||||
|
|
||||||
err_fail:
|
|
||||||
pr_err("amd-tee driver initialization failed\n");
|
pr_err("amd-tee driver initialization failed\n");
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue