diff mbox series

[-next] usb: musb: mpfs: add missing clk_disable_unprepare() in mpfs_remove()

Message ID 20220628140527.1404439-1-yangyingliang@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] usb: musb: mpfs: add missing clk_disable_unprepare() in mpfs_remove() | expand

Commit Message

Yang Yingliang June 28, 2022, 2:05 p.m. UTC
clock source is prepared and enabled by clk_prepare_enable()
in probe function, but no disable or unprepare in remove.

Fixes: 7a96b6ea90a4 ("usb: musb: Add support for PolarFire SoC's musb controller")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/usb/musb/mpfs.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Conor Dooley June 28, 2022, 4:57 p.m. UTC | #1
On 28/06/2022 15:05, Yang Yingliang wrote:
> clock source is prepared and enabled by clk_prepare_enable()
> in probe function, but no disable or unprepare in remove.
> 
> Fixes: 7a96b6ea90a4 ("usb: musb: Add support for PolarFire SoC's musb controller")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/usb/musb/mpfs.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/musb/mpfs.c b/drivers/usb/musb/mpfs.c
> index a69ca338eace..cea2e8108867 100644
> --- a/drivers/usb/musb/mpfs.c
> +++ b/drivers/usb/musb/mpfs.c
> @@ -239,6 +239,7 @@ static int mpfs_remove(struct platform_device *pdev)
>  {
>  	struct mpfs_glue *glue = platform_get_drvdata(pdev);
>  
> +	clk_disable_unprepare(glue->clk);
>  	platform_device_unregister(glue->musb);
>  	usb_phy_generic_unregister(pdev);
>  

I'll file this one under "obviously correct".
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Thanks!
diff mbox series

Patch

diff --git a/drivers/usb/musb/mpfs.c b/drivers/usb/musb/mpfs.c
index a69ca338eace..cea2e8108867 100644
--- a/drivers/usb/musb/mpfs.c
+++ b/drivers/usb/musb/mpfs.c
@@ -239,6 +239,7 @@  static int mpfs_remove(struct platform_device *pdev)
 {
 	struct mpfs_glue *glue = platform_get_drvdata(pdev);
 
+	clk_disable_unprepare(glue->clk);
 	platform_device_unregister(glue->musb);
 	usb_phy_generic_unregister(pdev);