rtc: optee: Fix error code in optee_rtc_read_alarm()

Return "optee_alarm" instead of "alarm".  The "alarm" pointer is a valid
pointer and not an error pointer.

Fixes: 6266aea864 ("rtc: optee: add alarm related rtc ops to optee rtc driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/9e3718fe1128964907619ad325c0c5f5c1354ace.1758182509.git.dan.carpenter@linaro.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
Dan Carpenter 2025-09-18 12:49:48 +03:00 committed by Alexandre Belloni
parent 8bbd727453
commit eb7392a019
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ static int optee_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
optee_alarm = tee_shm_get_va(priv->shm, 0);
if (IS_ERR(optee_alarm))
return PTR_ERR(alarm);
return PTR_ERR(optee_alarm);
if (param[0].u.memref.size != sizeof(*optee_alarm))
return -EPROTO;