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

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
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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;
}