]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/watchdog/watchdog_core.c
Merge remote-tracking branch 'watchdog/master'
[karo-tx-linux.git] / drivers / watchdog / watchdog_core.c
index 461336c4519faf3acee6dad759030a6f0778876d..cec9b559647dee675439058efb07138fe866edb7 100644 (file)
@@ -78,7 +78,7 @@ int watchdog_init_timeout(struct watchdog_device *wdd,
        watchdog_check_min_max_timeout(wdd);
 
        /* try to get the timeout module parameter first */
-       if (!watchdog_timeout_invalid(wdd, timeout_parm)) {
+       if (!watchdog_timeout_invalid(wdd, timeout_parm) && timeout_parm) {
                wdd->timeout = timeout_parm;
                return ret;
        }
@@ -89,7 +89,7 @@ int watchdog_init_timeout(struct watchdog_device *wdd,
        if (dev == NULL || dev->of_node == NULL)
                return ret;
        of_property_read_u32(dev->of_node, "timeout-sec", &t);
-       if (!watchdog_timeout_invalid(wdd, t))
+       if (!watchdog_timeout_invalid(wdd, t) && t)
                wdd->timeout = t;
        else
                ret = -EINVAL;