Merge tag 'ktest-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / watchdog / watchdog_dev.c
index ef8edec..08b48bb 100644 (file)
@@ -200,8 +200,7 @@ static int watchdog_set_timeout(struct watchdog_device *wddev,
            !(wddev->info->options & WDIOF_SETTIMEOUT))
                return -EOPNOTSUPP;
 
-       if ((wddev->max_timeout != 0) &&
-           (timeout < wddev->min_timeout || timeout > wddev->max_timeout))
+       if (watchdog_timeout_invalid(wddev, timeout))
                return -EINVAL;
 
        mutex_lock(&wddev->lock);