diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-12-05 19:06:55 +0300 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-12-10 16:29:23 +0300 |
commit | cf33e911f500f6e628f283e101c0240c79e0b5da (patch) | |
tree | 0281fe9d2fe904b4490adebca9e302775ec899e8 /drivers/rtc/rtc-stm32.c | |
parent | 751438bc0f10f75633144acd6ff145f7260706d5 (diff) | |
download | linux-cf33e911f500f6e628f283e101c0240c79e0b5da.tar.xz |
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>
Diffstat (limited to 'drivers/rtc/rtc-stm32.c')
-rw-r--r-- | drivers/rtc/rtc-stm32.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-stm32.c b/drivers/rtc/rtc-stm32.c index 781cabb2afca..d774aa18f57a 100644 --- a/drivers/rtc/rtc-stm32.c +++ b/drivers/rtc/rtc-stm32.c @@ -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); |