[PATCH 2/2] watchdog: Port RAVE SP watchdog driver from Linux kernel
Andrey Smirnov
andrew.smirnov at gmail.com
Wed May 2 10:47:42 PDT 2018
On Wed, May 2, 2018 at 3:24 AM, Sascha Hauer <s.hauer at pengutronix.de> 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
More information about the barebox
mailing list