@@ -126,6 +126,8 @@ int watchdog_init_timeout(struct watchdog_device *wdd,
wdd->timeout = timeout_parm;
return 0;
}
+ dev_err(dev, "driver supplied timeout (%u) out of range\n",
+ timeout_parm);
ret = -EINVAL;
}
@@ -136,9 +138,13 @@ int watchdog_init_timeout(struct watchdog_device *wdd,
wdd->timeout = t;
return 0;
}
+ dev_err(dev, "DT supplied timeout (%u) out of range\n", t);
ret = -EINVAL;
}
+ if (ret < 0 && wdd->timeout)
+ dev_warn(dev, "falling back to default timeout (%u)\n", wdd->timeout);
+
return ret;
}
EXPORT_SYMBOL_GPL(watchdog_init_timeout);