Commit d1f64cdf authored by Rouven Czerwinski's avatar Rouven Czerwinski Committed by Alexandre Belloni
Browse files

rtc: 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>
Link: https://patch.msgid.link/20260126-optee-simplify-context-match-v1-3-d4104e526cb6@linaro.org


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 81be22cd
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -541,10 +541,7 @@ static int optee_rtc_read_info(struct device *dev, struct rtc_device *rtc,

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 optee_rtc_probe(struct device *dev)