diff mbox series

watchdog: imx2_wdg: Save the actual timeout value

Message ID 20240615141059.345076-1-lqking7735@163.com
State New
Headers show
Series watchdog: imx2_wdg: Save the actual timeout value | expand

Commit Message

LongQiang June 15, 2024, 2:10 p.m. UTC
When setting the timeout, the effective timeout value should be saved.
Otherwise, the illegal timeout will take effect at 'start'.

Signed-off-by: LongQiang <lqking7735@163.com>
---
 drivers/watchdog/imx2_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 42e8ffae18dd..d4a4d4c58c3f 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -196,7 +196,7 @@  static int imx2_wdt_set_timeout(struct watchdog_device *wdog,
 
 	actual = min(new_timeout, IMX2_WDT_MAX_TIME);
 	__imx2_wdt_set_timeout(wdog, actual);
-	wdog->timeout = new_timeout;
+	wdog->timeout = actual;
 	return 0;
 }