Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

watchdog: rzg2l_wdt: Check return status of pm_runtime_put()

pm_runtime_put() may return an error code. Check its return status.

Along with it the rzg2l_wdt_set_timeout() function was updated to
propagate the result of rzg2l_wdt_stop() to its caller.

Fixes: 2cbc5cd0b55f ("watchdog: Add Watchdog Timer driver for RZ/G2L")
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20240531065723.1085423-5-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Claudiu Beznea and committed by
Wim Van Sebroeck
471e45a3 f0ba0fcd

+9 -2
+9 -2
drivers/watchdog/rzg2l_wdt.c
··· 144 144 static int rzg2l_wdt_stop(struct watchdog_device *wdev) 145 145 { 146 146 struct rzg2l_wdt_priv *priv = watchdog_get_drvdata(wdev); 147 + int ret; 147 148 148 149 rzg2l_wdt_reset(priv); 149 - pm_runtime_put(wdev->parent); 150 + 151 + ret = pm_runtime_put(wdev->parent); 152 + if (ret < 0) 153 + return ret; 150 154 151 155 return 0; 152 156 } ··· 167 163 * to reset the module) so that it is updated with new timeout values. 168 164 */ 169 165 if (watchdog_active(wdev)) { 170 - rzg2l_wdt_stop(wdev); 166 + ret = rzg2l_wdt_stop(wdev); 167 + if (ret) 168 + return ret; 169 + 171 170 ret = rzg2l_wdt_start(wdev); 172 171 } 173 172