rtc: s3c: Jump to central exit point on getting src clock error
authorKrzysztof Kozlowski <krzk@kernel.org>
Fri, 16 Jun 2017 19:28:02 +0000 (21:28 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Sat, 24 Jun 2017 20:52:32 +0000 (22:52 +0200)
In other error paths in probe, centralized exit point was used so make
this consistent.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-s3c.c

index d44fb34df8fe894b41f1a8c107e699f752ac5a00..c5aa7a35d07fed4656be6aafdaa49842cac75bb9 100644 (file)
@@ -510,8 +510,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
                        else
                                dev_dbg(&pdev->dev,
                                        "probe deferred due to missing rtc src clk\n");
-                       clk_disable_unprepare(info->rtc_clk);
-                       return ret;
+                       goto err_src_clk;
                }
                clk_prepare_enable(info->rtc_src_clk);
        }
@@ -575,6 +574,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
 
        if (info->data->needs_src_clk)
                clk_disable_unprepare(info->rtc_src_clk);
+err_src_clk:
        clk_disable_unprepare(info->rtc_clk);
 
        return ret;