aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2025-09-18 12:49:31 +0300
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2025-10-05 20:52:40 +0200
commit8bbd727453b497722b3e31b5d634c35faa953fbd (patch)
treec5e247632f9e6142ac8c76eac277ae0645329698 /drivers/rtc
parenta6b4f791cdc56655b2dee8ac793f5b28dc4e542d (diff)
downloadtip-8bbd727453b497722b3e31b5d634c35faa953fbd.tar.gz
rtc: optee: fix error code in probe()
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> Link: https://lore.kernel.org/r/21f1a18008f1bbc8f70d0bd5c05b72fbf5fc9c7d.1758182509.git.dan.carpenter@linaro.org Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-optee.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-optee.c b/drivers/rtc/rtc-optee.c
index 27db403e30476a..7b44d7723cae41 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;
}