On Wed, May 2, 2018 at 3:24 AM, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> wrote: > On Fri, Apr 20, 2018 at 06:33:38PM -0700, Andrey Smirnov wrote: >> +static int rave_sp_wdt_set_timeout(struct watchdog *wdd, >> + unsigned int timeout) >> +{ >> + struct rave_sp_wdt *sp_wd = to_rave_sp_wdt(wdd); >> + >> + if (timeout < sp_wd->variant->min_timeout || >> + timeout > sp_wd->variant->max_timeout) >> + return -EINVAL; >> + >> + if (!timeout) >> + return rave_sp_wdt_stop(wdd); > > Since min_timeout is > 0 this is never reached. You should move this up. > Good catch! Will do in v2. Thanks, Andrey Smirnov _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox