[PATCH 8/8] wdt: Handle return value from cyclic_register()
Marek Vasut
marek.vasut+renesas at mailbox.org
Sat Jan 18 05:01:02 CET 2025
Handle the error code returned by cyclic_register() and propagate it.
Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
---
Cc: Aaron Williams <awilliams at marvell.com>
Cc: Anatolij Gustschin <agust at denx.de>
Cc: Angelo Dureghello <angelo at kernel-space.org>
Cc: Christian Marangi <ansuelsmth at gmail.com>
Cc: Devarsh Thakkar <devarsht at ti.com>
Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
Cc: Jaehoon Chung <jh80.chung at samsung.com>
Cc: Michael Polyntsov <michael.polyntsov at iopsys.eu>
Cc: Michael Trimarchi <michael at amarulasolutions.com>
Cc: Nikhil M Jain <n-jain1 at ti.com>
Cc: Peng Fan <peng.fan at nxp.com>
Cc: Peter Robinson <pbrobinson at gmail.com>
Cc: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
Cc: Ronald Wahl <ronald.wahl at legrand.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Stefan Roese <sr at denx.de>
Cc: Tim Harvey <tharvey at gateworks.com>
Cc: Tom Rini <trini at konsulko.com>
Cc: u-boot at lists.denx.de
---
drivers/watchdog/wdt-uclass.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c
index 10be334e9ed..5778c8bee40 100644
--- a/drivers/watchdog/wdt-uclass.c
+++ b/drivers/watchdog/wdt-uclass.c
@@ -129,9 +129,11 @@ int wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags)
cyclic_unregister(&priv->cyclic);
/* Register the watchdog driver as a cyclic function */
- cyclic_register(&priv->cyclic, wdt_cyclic,
- priv->reset_period * 1000,
- dev->name);
+ ret = cyclic_register(&priv->cyclic, wdt_cyclic,
+ priv->reset_period * 1000,
+ dev->name);
+ if (ret)
+ return ret;
snprintf(str, 16, "every %ldms", priv->reset_period);
}
--
2.45.2
More information about the U-Boot
mailing list