diff options
Diffstat (limited to 'drivers/rtc/rtc-stm32.c')
-rw-r--r-- | drivers/rtc/rtc-stm32.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c index 3a5c3d7d0c77..34e09f43ac95 100644 --- a/drivers/rtc/rtc-stm32.c +++ b/drivers/rtc/rtc-stm32.c @@ -636,7 +636,7 @@ static int stm32_rtc_probe(struct platform_device *pdev) */ ret = stm32_rtc_init(pdev, rtc); if (ret) - goto err; + goto err_no_rtc_ck; rtc->irq_alarm = platform_get_irq(pdev, 0); if (rtc->irq_alarm <= 0) { @@ -680,10 +680,12 @@ static int stm32_rtc_probe(struct platform_device *pdev) dev_warn(&pdev->dev, "Date/Time must be initialized\n"); return 0; + err: + clk_disable_unprepare(rtc->rtc_ck); +err_no_rtc_ck: if (rtc->data->has_pclk) clk_disable_unprepare(rtc->pclk); - clk_disable_unprepare(rtc->rtc_ck); regmap_update_bits(rtc->dbp, PWR_CR, PWR_CR_DBP, 0); |