forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 cf4ce59b3b70238352c7f1729f0f7223214828ad
kernel/drivers/watchdog/sbsa_gwdt.c
....@@ -121,6 +121,7 @@
121121 struct sbsa_gwdt *gwdt = watchdog_get_drvdata(wdd);
122122
123123 wdd->timeout = timeout;
124
+ timeout = clamp_t(unsigned int, timeout, 1, wdd->max_hw_heartbeat_ms / 1000);
124125
125126 if (action)
126127 writel(gwdt->clk * timeout,