summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRouven Czerwinski <rouven.czerwinski@linaro.org>2026-01-26 11:11:26 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2026-02-20 23:12:10 +0100
commitd1f64cdfafdbd3fe220a59b85f13e125f49ce73e (patch)
tree579e7d1a0ae13626938d48d0dc314a05d2096394 /drivers
parent81be22cd4ace020045cc6d31255c6f7c071eb7c0 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/rtc/rtc-optee.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-optee.c b/drivers/rtc/rtc-optee.c
index 184c6d142801..2f18be3de684 100644
--- a/drivers/rtc/rtc-optee.c
+++ b/drivers/rtc/rtc-optee.c
@@ -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)