mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rijo Thomas <Rijo-john.Thomas@amd.com>
To: Jens Wiklander <jens.wiklander@linaro.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Gary R Hook <gary.hook@amd.com>,
	tee-dev@lists.linaro.org, linux-kernel@vger.kernel.org,
	linux-crypto@vger.kernel.org
Cc: Rijo Thomas <Rijo-john.Thomas@amd.com>,
	Nimesh Easow <Nimesh.Easow@amd.com>,
	Devaraj Rangasamy <Devaraj.Rangasamy@amd.com>,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: [PATCH 2/5] tee: amdtee: print error message if tee not present
Date: Thu,  9 Jan 2020 18:23:19 +0530	[thread overview]
Message-ID: <00f01ee8cfd613f00153494d5b14a3061e6db760.1578572591.git.Rijo-john.Thomas@amd.com> (raw)
In-Reply-To: <cover.1578572591.git.Rijo-john.Thomas@amd.com>

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>
---
 drivers/tee/amdtee/core.c | 7 ++++---
 1 file 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 @@ 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;
 }
-- 
2.17.1


  parent reply	other threads:[~2020-01-09 12:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09 12:53 [PATCH 0/5] amdtee: Address bug report Rijo Thomas
2020-01-09 12:53 ` [PATCH 1/5] tee: amdtee: remove unused variable initialization Rijo Thomas
2020-01-09 12:53 ` Rijo Thomas [this message]
2020-01-09 12:53 ` [PATCH 3/5] tee: amdtee: skip tee_device_unregister if tee_device_alloc fails Rijo Thomas
2020-01-09 12:53 ` [PATCH 4/5] tee: amdtee: rename err label to err_device_unregister Rijo Thomas
2020-01-09 12:53 ` [PATCH 5/5] tee: amdtee: remove redundant NULL check for pool Rijo Thomas
2020-01-09 16:14 ` [PATCH 0/5] amdtee: Address bug report Dan Carpenter
2020-01-16  7:29 ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00f01ee8cfd613f00153494d5b14a3061e6db760.1578572591.git.Rijo-john.Thomas@amd.com \
    --to=rijo-john.thomas@amd.com \
    --cc=Devaraj.Rangasamy@amd.com \
    --cc=Nimesh.Easow@amd.com \
    --cc=dan.carpenter@oracle.com \
    --cc=gary.hook@amd.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jens.wiklander@linaro.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tee-dev@lists.linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®