watchdog: cadence_wdt: still probe if user supplied timeout is invalid
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Fri, 19 Apr 2019 18:15:49 +0000 (20:15 +0200)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sun, 5 May 2019 19:04:59 +0000 (21:04 +0200)
We have a default timeout value in the driver which we will fall back to
if the user supplied values are out of bounce.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/cadence_wdt.c

index e6eaeaf3dfb108e3da8559781643dc05712ee103..a22f2d431a3556906e4b2719a65bbde72e955668 100644 (file)
@@ -328,10 +328,7 @@ static int cdns_wdt_probe(struct platform_device *pdev)
        /* Initialize the members of cdns_wdt structure */
        cdns_wdt_device->parent = dev;
 
-       ret = watchdog_init_timeout(cdns_wdt_device, wdt_timeout, dev);
-       if (ret)
-               return ret;
-
+       watchdog_init_timeout(cdns_wdt_device, wdt_timeout, dev);
        watchdog_set_nowayout(cdns_wdt_device, nowayout);
        watchdog_stop_on_reboot(cdns_wdt_device);
        watchdog_set_drvdata(cdns_wdt_device, wdt);