/* protection_queue_destroy - destroy the protection queue. @ubi: UBI device description object  */
static void protection_queue_destroy(struct ubi_device *ubi)
/* protection_queue_destroy - destroy the protection queue. @ubi: UBI device description object  */
static void protection_queue_destroy(struct ubi_device *ubi)
{
	int i;
	struct ubi_wl_entry *e, *tmp;
	for (i = 0; i < UBI_PROT_QUEUE_LEN; ++i) {
		list_for_each_entry_safe(e, tmp, &ubi->pq[i], u.list) {
			list_del(&e->u.list);
			kmem_cache_free(ubi_wl_entry_slab, e);
		}
	}
}