Skip to content

Commit 7f23a93

Browse files
Joonyoung Shimalexandrebelloni
authored andcommitted
rtc: s3c: add missing clk control
It's missed to call clk_unprepare() about info->rtc_src_clk in s3c_rtc_remove and to call clk_disable_unprepare about info->rtc_clk in error routine of s3c_rtc_probe. Signed-off-by: Joonyoung Shim <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 1fb1c35 commit 7f23a93

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/rtc/rtc-s3c.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,8 @@ static int s3c_rtc_remove(struct platform_device *pdev)
422422

423423
s3c_rtc_setaie(info->dev, 0);
424424

425+
if (info->data->needs_src_clk)
426+
clk_unprepare(info->rtc_src_clk);
425427
clk_unprepare(info->rtc_clk);
426428
info->rtc_clk = NULL;
427429

@@ -494,6 +496,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
494496
if (IS_ERR(info->rtc_src_clk)) {
495497
dev_err(&pdev->dev,
496498
"failed to find rtc source clock\n");
499+
clk_disable_unprepare(info->rtc_clk);
497500
return PTR_ERR(info->rtc_src_clk);
498501
}
499502
clk_prepare_enable(info->rtc_src_clk);

0 commit comments

Comments
 (0)