rtc: stm32: add missed clk_disable_unprepare in error path of resume
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/rtc/rtc-stm32.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/rtc/rtc-stm32.c +4 -1
@@ -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);
Signature · 1 line
2.24.0
Quoted 16 lines · Chuhong Yuan
The
resume()forgets to callclk_disable_unprepare()when failed. Add the missed call to fix it.Signed-off-by Chuhong Yuan <[email protected]>--- drivers/rtc/rtc-stm32.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/rtc/rtc-stm32.c +0
-0@@ -897,8 +897,11 @@ static int stm32_rtc_resume(struct device *dev) }
drivers/rtc/rtc-stm32.c static int stm32_rtc_resume(struct device *dev) · line 907
Quoted 10 lines
drivers/rtc/rtc-stm32.c +4
-1ret =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);
Reviewed-by Amelie Delaunay <[email protected]>
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 8 lines · Chuhong Yuan
The
resume()forgets to callclk_disable_unprepare()when failed. Add the missed call to fix it.Signed-off-by Chuhong Yuan <[email protected]>--- drivers/rtc/rtc-stm32.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Applied, thanks.
Signature · 3 lines
Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com