From af8ea170fbff70bf567290e04cdecf743fa417e9 Mon Sep 17 00:00:00 2001 From: Anand Prasad Date: Mon, 27 Feb 2017 11:00:19 -0800 Subject: trusty-ote: launch_op: Allow using an empty buffer Currently, the kernel-TA interface mandates use of a non-null buffer for the launch operation. However, not all Kernel Driver clients require the use of a buffer, like the otf kernel interface. This change modifies the interface to allow it to accept Empty Buffers. Bug 200244192 Bug 200268538 Change-Id: I9b40c4a64137e845b65794cec713342f95a1b440 Signed-off-by: Anand Prasad Reviewed-on: http://git-master/r/1312013 (cherry picked from commit 7015f9d178d0ec211fab97dc11b2f3e1631145c9) --- drivers/trusty/trusty-ote.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/trusty/trusty-ote.c b/drivers/trusty/trusty-ote.c index 1ea1e4ffb..cfc5e0a3b 100644 --- a/drivers/trusty/trusty-ote.c +++ b/drivers/trusty/trusty-ote.c @@ -428,8 +428,8 @@ EXPORT_SYMBOL(te_close_trusted_session); /* * te_launch_trusted_oper - Communicate with TA to perform any operation - * @buf: Buffer to sent to secure world. - * @buf_len: length of the buffer. + * @buf: Buffer to be sent to secure world (NULL if a buffer is not required) + * @buf_len: length of the buffer. (0 if a buffer is not required) * @ta_cmd: command to sent to secure world. * @ctx: ctx returned by open session. * Returns 0 on Success else error code. @@ -443,7 +443,7 @@ int te_launch_trusted_oper(void *buf, size_t buf_len, uint32_t ta_cmd, trusty_ote_debug("%s: cmd %u\n", __func__, ta_cmd); - if (!ctx || !buf || !buf_len) + if (!ctx) return -EINVAL; chan_ctx = (struct tipc_chan_ctx *)ctx; -- cgit v1.2.2