mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
drivers/rtc/rtc-s3c.c: fix initialization failure without rtc source clock
Fix unconditional initialization failure on non-exynos3250 SoCs.
Commit df9e26d093 ("rtc: s3c: add support for RTC of Exynos3250 SoC")
introduced rtc source clock support, but also added initialization
failure on SoCs, which doesn't need such clock.
Signed-off-by: Marek Szyprowski <[email protected]>
Reviewed-by: Chanwoo Choi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
0baf2a4dbf
commit
eaf3a65908
1 file changed
+8
-6
@@ -535,13 +535,15 @@ static int s3c_rtc_probe(struct platform_device *pdev)
|
||||
}
|
||||
clk_prepare_enable(info->rtc_clk);
|
||||
|
||||
info->rtc_src_clk = devm_clk_get(&pdev->dev, "rtc_src");
|
||||
if (IS_ERR(info->rtc_src_clk)) {
|
||||
dev_err(&pdev->dev, "failed to find rtc source clock\n");
|
||||
return PTR_ERR(info->rtc_src_clk);
|
||||
if (info->data->needs_src_clk) {
|
||||
info->rtc_src_clk = devm_clk_get(&pdev->dev, "rtc_src");
|
||||
if (IS_ERR(info->rtc_src_clk)) {
|
||||
dev_err(&pdev->dev,
|
||||
"failed to find rtc source clock\n");
|
||||
return PTR_ERR(info->rtc_src_clk);
|
||||
}
|
||||
clk_prepare_enable(info->rtc_src_clk);
|
||||
}
|
||||
clk_prepare_enable(info->rtc_src_clk);
|
||||
|
||||
|
||||
/* check to see if everything is setup correctly */
|
||||
if (info->data->enable)
|
||||
|
||||
Reference in new issue
Block a user