* [PATCH 0/2] rtc: optee: Fix a couple error codes
@ 2025-09-18 9:48 Dan Carpenter
2025-09-18 9:49 ` [PATCH 1/2] rtc: optee: fix error code in probe() Dan Carpenter
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2025-09-18 9:48 UTC (permalink / raw)
To: Clément Le Goffic
Cc: Alexandre Belloni, Clément Léger, linux-kernel,
linux-rtc
Fix a couple error codes detected by Smatch.
Dan Carpenter (2):
rtc: optee: fix error code in probe()
rtc: optee: Fix error code in optee_rtc_read_alarm()
drivers/rtc/rtc-optee.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
2.51.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] rtc: optee: fix error code in probe()
2025-09-18 9:48 [PATCH 0/2] rtc: optee: Fix a couple error codes Dan Carpenter
@ 2025-09-18 9:49 ` Dan Carpenter
2025-09-18 9:49 ` [PATCH 2/2] rtc: optee: Fix error code in optee_rtc_read_alarm() Dan Carpenter
2025-10-05 18:53 ` [PATCH 0/2] rtc: optee: Fix a couple error codes Alexandre Belloni
2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2025-09-18 9:49 UTC (permalink / raw)
To: Clément Le Goffic
Cc: Clément Léger, Alexandre Belloni, linux-rtc,
linux-kernel
Return an error code if kthread_create() fails. Currently the code
returns success.
Fixes: 6266aea864fa ("rtc: optee: add alarm related rtc ops to optee rtc driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/rtc/rtc-optee.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rtc/rtc-optee.c b/drivers/rtc/rtc-optee.c
index 27db403e3047..7b44d7723cae 100644
--- a/drivers/rtc/rtc-optee.c
+++ b/drivers/rtc/rtc-optee.c
@@ -614,6 +614,7 @@ static int optee_rtc_probe(struct device *dev)
priv, "rtc_alarm_evt");
if (IS_ERR(priv->alarm_task)) {
dev_err(dev, "Failed to create alarm thread\n");
+ err = PTR_ERR(priv->alarm_task);
goto out_shm;
}
--
2.51.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] rtc: optee: Fix error code in optee_rtc_read_alarm()
2025-09-18 9:48 [PATCH 0/2] rtc: optee: Fix a couple error codes Dan Carpenter
2025-09-18 9:49 ` [PATCH 1/2] rtc: optee: fix error code in probe() Dan Carpenter
@ 2025-09-18 9:49 ` Dan Carpenter
2025-10-05 18:53 ` [PATCH 0/2] rtc: optee: Fix a couple error codes Alexandre Belloni
2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2025-09-18 9:49 UTC (permalink / raw)
To: Clément Le Goffic
Cc: Clément Léger, Alexandre Belloni, linux-rtc,
linux-kernel
Return "optee_alarm" instead of "alarm". The "alarm" pointer is a valid
pointer and not an error pointer.
Fixes: 6266aea864fa ("rtc: optee: add alarm related rtc ops to optee rtc driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/rtc/rtc-optee.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-optee.c b/drivers/rtc/rtc-optee.c
index 7b44d7723cae..3d5662aa1bd8 100644
--- a/drivers/rtc/rtc-optee.c
+++ b/drivers/rtc/rtc-optee.c
@@ -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;
--
2.51.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] rtc: optee: Fix a couple error codes
2025-09-18 9:48 [PATCH 0/2] rtc: optee: Fix a couple error codes Dan Carpenter
2025-09-18 9:49 ` [PATCH 1/2] rtc: optee: fix error code in probe() Dan Carpenter
2025-09-18 9:49 ` [PATCH 2/2] rtc: optee: Fix error code in optee_rtc_read_alarm() Dan Carpenter
@ 2025-10-05 18:53 ` Alexandre Belloni
2 siblings, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2025-10-05 18:53 UTC (permalink / raw)
To: Clément Le Goffic, Dan Carpenter
Cc: Clément Léger, linux-kernel, linux-rtc
On Thu, 18 Sep 2025 12:48:39 +0300, Dan Carpenter wrote:
> Fix a couple error codes detected by Smatch.
>
> Dan Carpenter (2):
> rtc: optee: fix error code in probe()
> rtc: optee: Fix error code in optee_rtc_read_alarm()
>
> drivers/rtc/rtc-optee.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> [...]
Applied, thanks!
[1/2] rtc: optee: fix error code in probe()
https://git.kernel.org/abelloni/c/8bbd727453b4
[2/2] rtc: optee: Fix error code in optee_rtc_read_alarm()
https://git.kernel.org/abelloni/c/eb7392a01964
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-10-05 18:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-18 9:48 [PATCH 0/2] rtc: optee: Fix a couple error codes Dan Carpenter
2025-09-18 9:49 ` [PATCH 1/2] rtc: optee: fix error code in probe() Dan Carpenter
2025-09-18 9:49 ` [PATCH 2/2] rtc: optee: Fix error code in optee_rtc_read_alarm() Dan Carpenter
2025-10-05 18:53 ` [PATCH 0/2] rtc: optee: Fix a couple error codes Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox