From: Rouven Czerwinski Date: Mon, 26 Jan 2026 10:11:24 +0000 (+0100) Subject: optee: simplify OP-TEE context match X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c6e843f1c26a0b12720cab02f785c46450b6adc;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander --- diff --git a/drivers/tee/optee/device.c b/drivers/tee/optee/device.c index bae954e79fdc1..f751d743a120c 100644 --- a/drivers/tee/optee/device.c +++ b/drivers/tee/optee/device.c @@ -13,10 +13,7 @@ static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data) { - if (ver->impl_id == TEE_IMPL_ID_OPTEE) - return 1; - else - return 0; + return (ver->impl_id == TEE_IMPL_ID_OPTEE); } static int get_devices(struct tee_context *ctx, u32 session,