mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
watchdog: starfive: Add missing clk_disable_unprepare()
Add the missing clk_disable_unprepare() before return in starfive_wdt_enable_clock(). Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Reviewed-by: Xingyu Wu <xingyu.wu@starfivetech.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20240628033508.281058-1-nichen@iscas.ac.cn Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
This commit is contained in:
parent
d794a74101
commit
9dca7a0ae5
@ -152,8 +152,10 @@ static int starfive_wdt_enable_clock(struct starfive_wdt *wdt)
|
||||
return dev_err_probe(wdt->wdd.parent, ret, "failed to enable apb clock\n");
|
||||
|
||||
ret = clk_prepare_enable(wdt->core_clk);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
clk_disable_unprepare(wdt->apb_clk);
|
||||
return dev_err_probe(wdt->wdd.parent, ret, "failed to enable core clock\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user