Commit 8bbd7274 authored by Dan Carpenter's avatar Dan Carpenter Committed by Alexandre Belloni
Browse files

rtc: optee: fix error code in probe()



Return an error code if kthread_create() fails.  Currently the code
returns success.

Fixes: 6266aea8 ("rtc: optee: add alarm related rtc ops to optee rtc driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/21f1a18008f1bbc8f70d0bd5c05b72fbf5fc9c7d.1758182509.git.dan.carpenter@linaro.org


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent a6b4f791
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
		}