Skip to content

Commit d1f64cd

Browse files
Emantoralexandrebelloni
authored andcommitted
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: Rouven Czerwinski <rouven.czerwinski@linaro.org> Link: https://patch.msgid.link/20260126-optee-simplify-context-match-v1-3-d4104e526cb6@linaro.org Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent 81be22c commit d1f64cd

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

drivers/rtc/rtc-optee.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -541,10 +541,7 @@ static int optee_rtc_read_info(struct device *dev, struct rtc_device *rtc,
541541

542542
static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data)
543543
{
544-
if (ver->impl_id == TEE_IMPL_ID_OPTEE)
545-
return 1;
546-
else
547-
return 0;
544+
return (ver->impl_id == TEE_IMPL_ID_OPTEE);
548545
}
549546

550547
static int optee_rtc_probe(struct device *dev)

0 commit comments

Comments
 (0)