summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Prasad <anprasad@nvidia.com>2017-02-27 14:00:19 -0500
committerStephen Wolfe <swolfe@nvidia.com>2018-07-27 17:12:44 -0400
commitaf8ea170fbff70bf567290e04cdecf743fa417e9 (patch)
treeb19303ddbcbb7390fc66494b2a766e2caa695916
parentfe0703877d7d62bc49feac65240e44019136328a (diff)
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 <anprasad@nvidia.com> Reviewed-on: http://git-master/r/1312013 (cherry picked from commit 7015f9d178d0ec211fab97dc11b2f3e1631145c9)
-rw-r--r--drivers/trusty/trusty-ote.c6
1 files 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);
428 428
429/* 429/*
430 * te_launch_trusted_oper - Communicate with TA to perform any operation 430 * te_launch_trusted_oper - Communicate with TA to perform any operation
431 * @buf: Buffer to sent to secure world. 431 * @buf: Buffer to be sent to secure world (NULL if a buffer is not required)
432 * @buf_len: length of the buffer. 432 * @buf_len: length of the buffer. (0 if a buffer is not required)
433 * @ta_cmd: command to sent to secure world. 433 * @ta_cmd: command to sent to secure world.
434 * @ctx: ctx returned by open session. 434 * @ctx: ctx returned by open session.
435 * Returns 0 on Success else error code. 435 * 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,
443 443
444 trusty_ote_debug("%s: cmd %u\n", __func__, ta_cmd); 444 trusty_ote_debug("%s: cmd %u\n", __func__, ta_cmd);
445 445
446 if (!ctx || !buf || !buf_len) 446 if (!ctx)
447 return -EINVAL; 447 return -EINVAL;
448 448
449 chan_ctx = (struct tipc_chan_ctx *)ctx; 449 chan_ctx = (struct tipc_chan_ctx *)ctx;