Skip to content

Commit eb7392a

Browse files
Dan Carpenteralexandrebelloni
authored andcommitted
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: 6266aea ("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>
1 parent 8bbd727 commit eb7392a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/rtc/rtc-optee.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ static int optee_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
299299

300300
optee_alarm = tee_shm_get_va(priv->shm, 0);
301301
if (IS_ERR(optee_alarm))
302-
return PTR_ERR(alarm);
302+
return PTR_ERR(optee_alarm);
303303

304304
if (param[0].u.memref.size != sizeof(*optee_alarm))
305305
return -EPROTO;

0 commit comments

Comments
 (0)