From: Volodymyr Babchuk <vlad.babchuk@gmail.com>
To: Jens Wiklander <jens.wiklander@linaro.org>,
linux-kernel@vger.kernel.org (open list)
Cc: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Subject: [PATCH] optee: don't fail on unsuccessful device enumeration
Date: Wed, 13 May 2020 03:36:25 +0300 [thread overview]
Message-ID: <20200513003625.651340-1-vlad.babchuk@gmail.com> (raw)
In-Reply-To: <20200513003430.651232-1-vlad.babchuk@gmail.com>
optee_enumerate_devices() can fail for multiple of reasons. For
example, I encountered issue when Xen OP-TEE mediator NACKed
PTA_CMD_GET_DEVICES call. This should not result in driver
initialization error because this is an optional feature.
Thus, it is better to print warning, instead of termination driver
initialization.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
---
resend: fixed email in s-o-b tag. Sorry for the noise
drivers/tee/optee/core.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index 34409c916882..a053930032f2 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -728,10 +728,8 @@ static int __init optee_driver_init(void)
return PTR_ERR(optee);
rc = optee_enumerate_devices();
- if (rc) {
- optee_remove(optee);
- return rc;
- }
+ if (rc)
+ pr_warn("can't enumerate optee devices: %d\n", rc);
pr_info("initialized driver\n");
--
2.26.2
next prev parent reply other threads:[~2020-05-13 0:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 0:34 Volodymyr Babchuk
2020-05-13 0:36 ` Volodymyr Babchuk [this message]
2020-05-13 8:00 ` Jens Wiklander
2020-05-13 8:23 ` Sumit Garg
2020-05-14 1:18 ` Volodymyr Babchuk
2020-05-14 5:38 ` Sumit Garg
2020-05-15 1:01 ` Volodymyr Babchuk
2020-05-15 4:54 ` Sumit Garg
2020-05-18 10:27 ` Volodymyr Babchuk
2020-05-18 12:34 ` Sumit Garg
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=20200513003625.651340-1-vlad.babchuk@gmail.com \
--to=vlad.babchuk@gmail.com \
--cc=jens.wiklander@linaro.org \
--cc=linux-kernel@vger.kernel.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®