mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
mtd: st_spi_fsm: Disable clock only after device was unregistered
Until mtd_device_unregister() returns the device is expected to be
operational. So only disable the clock after the mtd is unregistered.
Fixes: 1fefc8ecb8
("mtd: st_spi_fsm: add missing clk_disable_unprepare() in stfsm_remove()")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220607152458.232847-4-u.kleine-koenig@pengutronix.de
This commit is contained in:
parent
cfa7847f15
commit
cd043c613e
@ -2128,10 +2128,10 @@ static int stfsm_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct stfsm *fsm = platform_get_drvdata(pdev);
|
||||
|
||||
clk_disable_unprepare(fsm->clk);
|
||||
|
||||
WARN_ON(mtd_device_unregister(&fsm->mtd));
|
||||
|
||||
clk_disable_unprepare(fsm->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user