diff options
author | Denys Drozdov <denys.drozdov@toradex.com> | 2022-01-10 13:54:25 +0200 |
---|---|---|
committer | Denys Drozdov <denys.drozdov@toradex.com> | 2022-01-10 13:54:25 +0200 |
commit | 755960f3c9336fe5fd4d9607c12c0edcff8f04c5 (patch) | |
tree | 8f3b10fe1edc98a144b975bd553c0bb973159294 /drivers/mtd/mtdcore.c | |
parent | 73d0438130d3728b034835168028bc44a94bd812 (diff) | |
parent | 5c088fba39aff97ae9175948356ef3292369671c (diff) |
Merge tag 'v5.4.161' into toradex_5.4.y
This is the 5.4.161 stable release
Diffstat (limited to 'drivers/mtd/mtdcore.c')
-rw-r--r-- | drivers/mtd/mtdcore.c | 4 |
1 files changed, 2 insertions, 2 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); |