diff options
author | Rijo Thomas <Rijo-john.Thomas@amd.com> | 2020-01-09 13:53:19 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-01-16 08:18:13 +0100 |
commit | f4c58c3758f95eec5ea9cf1424d68350f00f9eb9 (patch) | |
tree | 6778e2b670885f1e949eed79e8ece85e1730d831 /drivers/tee | |
parent | tee: amdtee: remove unused variable initialization (diff) | |
download | linux-f4c58c3758f95eec5ea9cf1424d68350f00f9eb9.tar.xz linux-f4c58c3758f95eec5ea9cf1424d68350f00f9eb9.zip |
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>
Diffstat (limited to 'drivers/tee')
-rw-r--r-- | drivers/tee/amdtee/core.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/tee/amdtee/core.c b/drivers/tee/amdtee/core.c index b3f8235579f7..0840be03a3ab 100644 --- a/drivers/tee/amdtee/core.c +++ b/drivers/tee/amdtee/core.c @@ -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 @@ err_kfree_drv_data: kfree(drv_data); drv_data = NULL; -err_fail: pr_err("amd-tee driver initialization failed\n"); return rc; } |