Commit 8c6e843f authored by Rouven Czerwinski's avatar Rouven Czerwinski Committed by Jens Wiklander
Browse files

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: default avatarRouven Czerwinski <rouven.czerwinski@linaro.org>
Reviewed-by: default avatarSumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
parent 6de23f81
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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,