Skip to content

Commit

Permalink
rtc: s3c: add missing clk control
Browse files Browse the repository at this point in the history
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 <jy0922.shim@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
  • Loading branch information
Joonyoung Shim authored and Alexandre Belloni committed Sep 5, 2015
1 parent 1fb1c35 commit 7f23a93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/rtc/rtc-s3c.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,8 @@ static int s3c_rtc_remove(struct platform_device *pdev)

s3c_rtc_setaie(info->dev, 0);

if (info->data->needs_src_clk)
clk_unprepare(info->rtc_src_clk);
clk_unprepare(info->rtc_clk);
info->rtc_clk = NULL;

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

0 comments on commit 7f23a93

Please sign in to comment.