watchdog: skip min and max timeout validity check when max_hw_heartbeat_ms is defined
[linux-2.6-microblaze.git] / drivers / watchdog / watchdog_core.c
index f4f02d2..6abb83c 100644 (file)
@@ -88,7 +88,7 @@ static void watchdog_check_min_max_timeout(struct watchdog_device *wdd)
         * Check that we have valid min and max timeout values, if
         * not reset them both to 0 (=not used or unknown)
         */
-       if (wdd->min_timeout > wdd->max_timeout) {
+       if (!wdd->max_hw_heartbeat_ms && wdd->min_timeout > wdd->max_timeout) {
                pr_info("Invalid min and max timeout values, resetting to 0!\n");
                wdd->min_timeout = 0;
                wdd->max_timeout = 0;