summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorDenys Drozdov <denys.drozdov@toradex.com>2022-01-10 14:21:04 +0200
committerDenys Drozdov <denys.drozdov@toradex.com>2022-01-10 14:21:04 +0200
commit905e3a2de88e6fbf0e2c0d3f1ae4217a6f75e126 (patch)
tree5aca9cb53f47568803fabab9581eb3f11a1b65d5 /drivers/mtd
parent73268bc9be0e8dc0b6c30d6a85b937b4586cc7f1 (diff)
parent17efa1a44c7f615e9ec321f82138e7711690e7a1 (diff)
Merge tag 'v5.4.160' into HEAD
This is the 5.4.160 stable release
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/mtdcore.c4
-rw-r--r--drivers/mtd/spi-nor/hisi-sfc.c1
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 32a76b8feaa5..ac5d3b6db9b8 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -727,8 +727,6 @@ int del_mtd_device(struct mtd_info *mtd)
mutex_lock(&mtd_table_mutex);
- debugfs_remove_recursive(mtd->dbg.dfs_dir);
-
if (idr_find(&mtd_idr, mtd->index) != mtd) {
ret = -ENODEV;
goto out_error;
@@ -744,6 +742,8 @@ int del_mtd_device(struct mtd_info *mtd)
mtd->index, mtd->name, mtd->usecount);
ret = -EBUSY;
} else {
+ debugfs_remove_recursive(mtd->dbg.dfs_dir);
+
/* Try to remove the NVMEM provider */
if (mtd->nvmem)
nvmem_unregister(mtd->nvmem);
diff --git a/drivers/mtd/spi-nor/hisi-sfc.c b/drivers/mtd/spi-nor/hisi-sfc.c
index 8fcc48056a8b..569cfd473c87 100644
--- a/drivers/mtd/spi-nor/hisi-sfc.c
+++ b/drivers/mtd/spi-nor/hisi-sfc.c
@@ -474,7 +474,6 @@ static int hisi_spi_nor_remove(struct platform_device *pdev)
hisi_spi_nor_unregister_all(host);
mutex_destroy(&host->lock);
- clk_disable_unprepare(host->clk);
return 0;
}