diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-06-06 13:17:53 +0300 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2017-07-03 12:02:38 +0300 |
commit | 8f11eb58ad5747bab622910cc2efaa45e6a21c1f (patch) | |
tree | 6f685b912fabac260b4b4b70a322f821a8618d19 /drivers/watchdog/davinci_wdt.c | |
parent | 65360944c19814a6d3c0a58c5a983f7198d29c51 (diff) | |
download | linux-8f11eb58ad5747bab622910cc2efaa45e6a21c1f.tar.xz |
watchdog: davinci: Handle return value of clk_prepare_enable
clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/davinci_wdt.c')
-rw-r--r-- | drivers/watchdog/davinci_wdt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c index 0e731d797a2a..1ba9ead7d75a 100644 --- a/drivers/watchdog/davinci_wdt.c +++ b/drivers/watchdog/davinci_wdt.c @@ -173,7 +173,11 @@ static int davinci_wdt_probe(struct platform_device *pdev) return PTR_ERR(davinci_wdt->clk); } - clk_prepare_enable(davinci_wdt->clk); + ret = clk_prepare_enable(davinci_wdt->clk); + if (ret) { + dev_err(&pdev->dev, "failed to prepare clock\n"); + return ret; + } platform_set_drvdata(pdev, davinci_wdt); |