[SRU][K][PATCH 3/4] usb: musb: mpfs: add missing clk_disable_unprepare() in mpfs_remove()

Emil Renner Berthing emil.renner.berthing at canonical.com
Mon Aug 29 13:51:47 UTC 2022

From: Yang Yingliang <yangyingliang at huawei.com>

BugLink: https://bugs.launchpad.net/bugs/1986970

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 at huawei.com>
Reviewed-by: Conor Dooley <conor.dooley at microchip.com>
Signed-off-by: Yang Yingliang <yangyingliang at huawei.com>
Link: https://lore.kernel.org/r/20220628140527.1404439-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
(cherry picked from commit 98ceba7559280cdd09feccc7af4406d93187fbfb)
Signed-off-by: Emil Renner Berthing <emil.renner.berthing at canonical.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);

More information about the kernel-team mailing list