mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
OP-TEE: fix clang warning
security/optee_linuxdriver/core/tee_session.c:683:22: error: address of array 'cmd_io->op->params' will always evaluate to 'true'
[-Werror,-Wpointer-bool-conversion]
BUG_ON(!cmd_io->op->params);
~~~~~~~~~~~~~^~~~~~
/security/optee_linuxdriver/core/tee_kernel_api.c:85:18: error: address of array 'context->devname' will always evaluate to 'true'
[-Werror,-Wpointer-bool-conversion]
&& context->devname) ? context->devname : "");
~~ ~~~~~~~~~^~~~~~~
Change-Id: I6fa7e26fa620b48a0a255393b4279ff1cf1700c3
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
parent
9a9b5bb34a
commit
fbbb55cb30
|
|
@ -81,8 +81,7 @@ void TEEC_FinalizeContext(TEEC_Context *context)
|
|||
{
|
||||
if (!context || !context->fd) {
|
||||
pr_err("%s - can't release context %p:[%s]\n", __func__,
|
||||
context, (context
|
||||
&& context->devname) ? context->devname : "");
|
||||
context, context ? context->devname : "");
|
||||
return;
|
||||
}
|
||||
/* TODO fixme will not work on 64-bit platform */
|
||||
|
|
|
|||
|
|
@ -680,7 +680,6 @@ static void _update_client_tee_cmd(struct tee_session *sess,
|
|||
|
||||
BUG_ON(!cmd_io);
|
||||
BUG_ON(!cmd_io->op);
|
||||
BUG_ON(!cmd_io->op->params);
|
||||
BUG_ON(!cmd);
|
||||
BUG_ON(!sess->ctx);
|
||||
ctx = sess->ctx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user