diff options
Diffstat (limited to 'drivers/watchdog/watchdog_dev.c')
-rw-r--r-- | drivers/watchdog/watchdog_dev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c index ef8edecfc526..08b48bbf9f4b 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c | |||
@@ -200,8 +200,7 @@ static int watchdog_set_timeout(struct watchdog_device *wddev, | |||
200 | !(wddev->info->options & WDIOF_SETTIMEOUT)) | 200 | !(wddev->info->options & WDIOF_SETTIMEOUT)) |
201 | return -EOPNOTSUPP; | 201 | return -EOPNOTSUPP; |
202 | 202 | ||
203 | if ((wddev->max_timeout != 0) && | 203 | if (watchdog_timeout_invalid(wddev, timeout)) |
204 | (timeout < wddev->min_timeout || timeout > wddev->max_timeout)) | ||
205 | return -EINVAL; | 204 | return -EINVAL; |
206 | 205 | ||
207 | mutex_lock(&wddev->lock); | 206 | mutex_lock(&wddev->lock); |