[PATCH] mtd, ubi: set free_count to zero before walking through erase list

2016-04-22 Thread Heiko Schocher
Set free_count to zero before walking through ai->erase list in wl_init(). Found in U-Boot as U-Boot has no workqueue/threads, it immediately calls erase_worker(), which increase for each erased block free_count. Without this patch, free_count gets after this initialized to zero in wl_init(), so

[PATCH] mtd, ubi: set free_count to zero before walking through erase list

2016-04-22 Thread Heiko Schocher
Set free_count to zero before walking through ai->erase list in wl_init(). Found in U-Boot as U-Boot has no workqueue/threads, it immediately calls erase_worker(), which increase for each erased block free_count. Without this patch, free_count gets after this initialized to zero in wl_init(), so