Commit cf33e911 authored by Chuhong Yuan's avatar Chuhong Yuan Committed by Alexandre Belloni

rtc: stm32: add missed clk_disable_unprepare in error path of resume

The resume() forgets to call clk_disable_unprepare() when failed.
Add the missed call to fix it.
Signed-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
Reviewed-by: default avatarAmelie Delaunay <amelie.delaunay@st.com>
Link: https://lore.kernel.org/r/20191205160655.32188-1-hslester96@gmail.comSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 751438bc
...@@ -897,8 +897,11 @@ static int stm32_rtc_resume(struct device *dev) ...@@ -897,8 +897,11 @@ static int stm32_rtc_resume(struct device *dev)
} }
ret = stm32_rtc_wait_sync(rtc); ret = stm32_rtc_wait_sync(rtc);
if (ret < 0) if (ret < 0) {
if (rtc->data->has_pclk)
clk_disable_unprepare(rtc->pclk);
return ret; return ret;
}
if (device_may_wakeup(dev)) if (device_may_wakeup(dev))
return disable_irq_wake(rtc->irq_alarm); return disable_irq_wake(rtc->irq_alarm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment