Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

watchdog: davinci: Add missing clk_disable_unprepare().

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>

authored by

Arvind Yadav and committed by
Wim Van Sebroeck
737bcff5 8f11eb58

+3 -1
+3 -1
drivers/watchdog/davinci_wdt.c
··· 202 202 return PTR_ERR(davinci_wdt->base); 203 203 204 204 ret = watchdog_register_device(wdd); 205 - if (ret < 0) 205 + if (ret < 0) { 206 + clk_disable_unprepare(davinci_wdt->clk); 206 207 dev_err(dev, "cannot register watchdog device\n"); 208 + } 207 209 208 210 return ret; 209 211 }