mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 08:44:14 +08:00
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: Chuhong Yuan <hslester96@gmail.com> Reviewed-by: Amelie Delaunay <amelie.delaunay@st.com> Link: https://lore.kernel.org/r/20191205160655.32188-1-hslester96@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
751438bc0f
commit
cf33e911f5
@ -897,8 +897,11 @@ static int stm32_rtc_resume(struct device *dev)
|
||||
}
|
||||
|
||||
ret = stm32_rtc_wait_sync(rtc);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
if (rtc->data->has_pclk)
|
||||
clk_disable_unprepare(rtc->pclk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (device_may_wakeup(dev))
|
||||
return disable_irq_wake(rtc->irq_alarm);
|
||||
|
Loading…
Reference in New Issue
Block a user