diff options
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r-- | drivers/mtd/ubi/fastmap.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c index 05067f522476..4cfc8da27221 100644 --- a/drivers/mtd/ubi/fastmap.c +++ b/drivers/mtd/ubi/fastmap.c | |||
@@ -841,6 +841,19 @@ static int ubi_attach_fastmap(struct ubi_device *ubi, | |||
841 | fail_bad: | 841 | fail_bad: |
842 | ret = UBI_BAD_FASTMAP; | 842 | ret = UBI_BAD_FASTMAP; |
843 | fail: | 843 | fail: |
844 | list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &used, u.list) { | ||
845 | kmem_cache_free(ai->aeb_slab_cache, tmp_aeb); | ||
846 | list_del(&tmp_aeb->u.list); | ||
847 | } | ||
848 | list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &eba_orphans, u.list) { | ||
849 | kmem_cache_free(ai->aeb_slab_cache, tmp_aeb); | ||
850 | list_del(&tmp_aeb->u.list); | ||
851 | } | ||
852 | list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &free, u.list) { | ||
853 | kmem_cache_free(ai->aeb_slab_cache, tmp_aeb); | ||
854 | list_del(&tmp_aeb->u.list); | ||
855 | } | ||
856 | |||
844 | return ret; | 857 | return ret; |
845 | } | 858 | } |
846 | 859 | ||