diff mbox series

[1/2] watchdog: sama5d4: fix timeout-sec usage

Message ID 20180914101339.7382-2-romain.izard.pro@gmail.com (mailing list archive)
State New, archived
Headers show
Series Fixes for the SAMA5D2/SAMA5D4 watchdog | expand

Commit Message

Romain Izard Sept. 14, 2018, 10:13 a.m. UTC
When using watchdog_init_timeout to update the default timeout value,
an error means that there is no "timeout-sec" in the relevant device
tree node.

This should not prevent binding of the driver to the device.

Fixes: 976932e40036 ("watchdog: sama5d4: make use of timeout-secs provided in devicetree")
Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
---
 drivers/watchdog/sama5d4_wdt.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Guenter Roeck Sept. 14, 2018, 1:37 p.m. UTC | #1
On 09/14/2018 03:13 AM, Romain Izard wrote:
> When using watchdog_init_timeout to update the default timeout value,
> an error means that there is no "timeout-sec" in the relevant device
> tree node.
> 
> This should not prevent binding of the driver to the device.
> 
> Fixes: 976932e40036 ("watchdog: sama5d4: make use of timeout-secs provided in devicetree")
> Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/sama5d4_wdt.c | 6 +-----
>   1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
> index 255169916dbb..1e93c1b0e3cf 100644
> --- a/drivers/watchdog/sama5d4_wdt.c
> +++ b/drivers/watchdog/sama5d4_wdt.c
> @@ -247,11 +247,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
>   		}
>   	}
>   
> -	ret = watchdog_init_timeout(wdd, wdt_timeout, &pdev->dev);
> -	if (ret) {
> -		dev_err(&pdev->dev, "unable to set timeout value\n");
> -		return ret;
> -	}
> +	watchdog_init_timeout(wdd, wdt_timeout, &pdev->dev);
>   
>   	timeout = WDT_SEC2TICKS(wdd->timeout);
>   
>
Marcus Folkesson Sept. 15, 2018, 1:46 p.m. UTC | #2
On Fri, Sep 14, 2018 at 12:13:38PM +0200, Romain Izard wrote:
> When using watchdog_init_timeout to update the default timeout value,
> an error means that there is no "timeout-sec" in the relevant device
> tree node.
> 
> This should not prevent binding of the driver to the device.
> 
> Fixes: 976932e40036 ("watchdog: sama5d4: make use of timeout-secs provided in devicetree")
> Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>

Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com>
diff mbox series

Patch

diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c
index 255169916dbb..1e93c1b0e3cf 100644
--- a/drivers/watchdog/sama5d4_wdt.c
+++ b/drivers/watchdog/sama5d4_wdt.c
@@ -247,11 +247,7 @@  static int sama5d4_wdt_probe(struct platform_device *pdev)
 		}
 	}
 
-	ret = watchdog_init_timeout(wdd, wdt_timeout, &pdev->dev);
-	if (ret) {
-		dev_err(&pdev->dev, "unable to set timeout value\n");
-		return ret;
-	}
+	watchdog_init_timeout(wdd, wdt_timeout, &pdev->dev);
 
 	timeout = WDT_SEC2TICKS(wdd->timeout);