mirror of https://github.com/torvalds/linux.git
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:
parent
8bbd727453
commit
eb7392a019
|
|
@ -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);
|
optee_alarm = tee_shm_get_va(priv->shm, 0);
|
||||||
if (IS_ERR(optee_alarm))
|
if (IS_ERR(optee_alarm))
|
||||||
return PTR_ERR(alarm);
|
return PTR_ERR(optee_alarm);
|
||||||
|
|
||||||
if (param[0].u.memref.size != sizeof(*optee_alarm))
|
if (param[0].u.memref.size != sizeof(*optee_alarm))
|
||||||
return -EPROTO;
|
return -EPROTO;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue