rtc: brcmstb-waketimer: add missed clk_disable_unprepare
Subsystems (2)
PATCH 1/1 rtc: brcmstb-waketimer: add missed clk_disable_unprepare
This driver forgets to disable and unprepare clock when remove. Add a call to clk_disable_unprepare to fix it.
Signed-off-by Chuhong Yuan <[email protected]>
--- drivers/rtc/rtc-brcmstb-waketimer.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/rtc/rtc-brcmstb-waketimer.c +2 -0
@@ -277,6 +277,8 @@ static int brcmstb_waketmr_remove(struct platform_device *pdev)struct brcmstb_waketmr *timer =dev_get_drvdata (&pdev->dev);unregister_reboot_notifier (&timer->reboot_notifier); +if (timer->clk) +clk_disable_unprepare (timer->clk);return 0 ; }
Signature · 1 line
2.23.0
Quoted 4 lines · Chuhong Yuan
This driver forgets to disable and unprepare clock when remove. Add a call to
clk_disable_unprepareto fix it.Signed-off-by Chuhong Yuan <[email protected]>
This looks fine, you do not need to check for timer->clk, since the clk_* APIs do that, and we made sure in the probe function that we would not be passing a timer->clk handle which is valid.
Also feel free to add:
Fixes c4f07ecee22e ("rtc: brcmstb-waketimer: Add Broadcom STB wake-timer")
Thank you
Signature · 1 line
Florian