usb: musb: mpfs: add missing clk_disable_unprepare() in mpfs_remove()
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 28 Jun 2022 14:05:27 +0000 (22:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jun 2022 19:02:05 +0000 (21:02 +0200)
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>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220628140527.1404439-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/mpfs.c

index a69ca33..cea2e81 100644 (file)
@@ -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);