Skip to content

Commit

Permalink
watchdog: davinci: Add missing clk_disable_unprepare().
Browse files Browse the repository at this point in the history
davinci_wdt_probe() can fail here and we must disable clock.

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>
  • Loading branch information
Arvind Yadav authored and Wim Van Sebroeck committed Jul 3, 2017
1 parent 8f11eb5 commit 737bcff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/watchdog/davinci_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,10 @@ static int davinci_wdt_probe(struct platform_device *pdev)
return PTR_ERR(davinci_wdt->base);

ret = watchdog_register_device(wdd);
if (ret < 0)
if (ret < 0) {
clk_disable_unprepare(davinci_wdt->clk);
dev_err(dev, "cannot register watchdog device\n");
}

return ret;
}
Expand Down

0 comments on commit 737bcff

Please sign in to comment.