From: Yang Yingliang Date: Mon, 16 May 2022 09:29:11 +0000 (+0800) Subject: mtd: st_spi_fsm: add missing clk_disable_unprepare() in stfsm_remove() X-Git-Tag: v5.19-rc1~190^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1fefc8ecb834c88edfc27e712d683872d0c541dd;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20220516092911.953066-1-yangyingliang@huawei.com --- diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c index 983999c020d66..d3377b10fc0f6 100644 --- a/drivers/mtd/devices/st_spi_fsm.c +++ b/drivers/mtd/devices/st_spi_fsm.c @@ -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); }