mtd: st_spi_fsm: add missing clk_disable_unprepare() in stfsm_remove()
PATCH v2 1/1 mtd: st_spi_fsm: add missing clk_disable_unprepare() in stfsm_remove()
Clock source is prepared and enabled by clk_prepare_enable() in probe function, but not disabled or unprepared in remove function.
Signed-off-by Yang Yingliang <[email protected]>
---
v2:
make the commit message and title more proper.
--- drivers/mtd/devices/st_spi_fsm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/mtd/devices/st_spi_fsm.c +2 -0
@@ -2126,6 +2126,8 @@ static int stfsm_remove(struct platform_device *pdev) {struct stfsm *fsm =platform_get_drvdata (pdev); +clk_disable_unprepare (fsm->clk); +return mtd_device_unregister (&fsm->mtd); }
Signature · 1 line
2.25.1
Hi Yang,
[email protected] wrote on Mon, 16 May 2022 17:29:11 +0800:
Quoted 4 lines
Clock source is prepared and enabled by
clk_prepare_enable()in probe function, but not disabled or unprepared in remove function.
Applied to mtd/next, thanks!
Quoted 13 lines
Signed-off-by Yang Yingliang <[email protected]>---
v2:
make the commit message and title more proper.--- drivers/mtd/devices/st_spi_fsm.c | 2 ++ 1 file changed, 2 insertions(+)drivers/mtd/devices/st_spi_fsm.c +0
-0
drivers/mtd/devices/st_spi_fsm.c static int stfsm_remove(struct platform_device *pdev) · line 2133
Quoted 8 lines
drivers/mtd/devices/st_spi_fsm.c +2
-0@@ -2126,6 +2126,8 @@ static int stfsm_remove(struct platform_device *pdev) {struct stfsm *fsm =platform_get_drvdata (pdev); +clk_disable_unprepare (fsm->clk); +return mtd_device_unregister (&fsm->mtd); }
Thanks,
Miquèl