aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/ubi/wl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index 17ec948ac40e..959c7b12e0b1 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -1534,6 +1534,7 @@ int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai)
1534 INIT_LIST_HEAD(&ubi->pq[i]); 1534 INIT_LIST_HEAD(&ubi->pq[i]);
1535 ubi->pq_head = 0; 1535 ubi->pq_head = 0;
1536 1536
1537 ubi->free_count = 0;
1537 list_for_each_entry_safe(aeb, tmp, &ai->erase, u.list) { 1538 list_for_each_entry_safe(aeb, tmp, &ai->erase, u.list) {
1538 cond_resched(); 1539 cond_resched();
1539 1540
@@ -1552,7 +1553,6 @@ int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai)
1552 found_pebs++; 1553 found_pebs++;
1553 } 1554 }
1554 1555
1555 ubi->free_count = 0;
1556 list_for_each_entry(aeb, &ai->free, u.list) { 1556 list_for_each_entry(aeb, &ai->free, u.list) {
1557 cond_resched(); 1557 cond_resched();
1558 1558