Skip to content

Commit 8c6e843

Browse files
Emantorjenswi-linaro
authored andcommitted
optee: simplify OP-TEE context match
Simplify the TEE implementor ID match by returning the boolean expression directly instead of going through an if/else. Signed-off-by: Rouven Czerwinski <rouven.czerwinski@linaro.org> Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
1 parent 6de23f8 commit 8c6e843

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

drivers/tee/optee/device.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313

1414
static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data)
1515
{
16-
if (ver->impl_id == TEE_IMPL_ID_OPTEE)
17-
return 1;
18-
else
19-
return 0;
16+
return (ver->impl_id == TEE_IMPL_ID_OPTEE);
2017
}
2118

2219
static int get_devices(struct tee_context *ctx, u32 session,

0 commit comments

Comments
 (0)