1 MIPS: ath79: fix maximum timeout
3 If the userland tries to set a timeout higher than the max_timeout, then we should fallback to max_timeout.
5 Signed-off-by: John Crispin <blogic@openwrt.org>
7 --- a/drivers/watchdog/ath79_wdt.c
8 +++ b/drivers/watchdog/ath79_wdt.c
9 @@ -115,10 +115,14 @@ static inline void ath79_wdt_disable(voi
11 static int ath79_wdt_set_timeout(int val)
13 - if (val < 1 || val > max_timeout)
18 + if (val > max_timeout)
19 + timeout = max_timeout;
23 ath79_wdt_keepalive();