Skip to content

Commit da66637

Browse files
GUO ZihuaSasha Levin
GUO Zihua
authored and
Sasha Levin
committed
rtc: mxc_v2: Add missing clk_disable_unprepare()
[ Upstream commit 55d5a86 ] The call to clk_disable_unprepare() is left out in the error handling of devm_rtc_allocate_device. Add it back. Fixes: 5490a1e ("rtc: mxc_v2: fix possible race condition") Signed-off-by: GUO Zihua <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 8f3d856 commit da66637

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/rtc/rtc-mxc_v2.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,10 @@ static int mxc_rtc_probe(struct platform_device *pdev)
336336
}
337337

338338
pdata->rtc = devm_rtc_allocate_device(&pdev->dev);
339-
if (IS_ERR(pdata->rtc))
339+
if (IS_ERR(pdata->rtc)) {
340+
clk_disable_unprepare(pdata->clk);
340341
return PTR_ERR(pdata->rtc);
342+
}
341343

342344
pdata->rtc->ops = &mxc_rtc_ops;
343345
pdata->rtc->range_max = U32_MAX;

0 commit comments

Comments
 (0)