- res = resources->io_head;
- resources->io_head = NULL;
-
- while (res) {
- tres = res;
- res = res->next;
- kfree(tres);
- }
-
- res = resources->mem_head;
- resources->mem_head = NULL;
-
- while (res) {
- tres = res;
- res = res->next;
- kfree(tres);
- }
-
- res = resources->p_mem_head;
- resources->p_mem_head = NULL;
-
- while (res) {
- tres = res;
- res = res->next;
- kfree(tres);
- }
-
- res = resources->bus_head;
- resources->bus_head = NULL;