free_pciehp_res(next->io_head); free_pciehp_res(next->mem_head); free_pciehp_res(next->p_mem_head); free_pciehp_res(next->bus_head);
static void __exit unload_pciehpd(void){	struct pci_func *next;	struct pci_func *TempSlot;	int loop;	struct controller *ctrl;	struct controller *tctrl;	ctrl = pciehp_ctrl_list;	while (ctrl) {		cleanup_slots(ctrl);		free_pciehp_res(ctrl->io_head);		free_pciehp_res(ctrl->mem_head);		free_pciehp_res(ctrl->p_mem_head);		free_pciehp_res(ctrl->bus_head);		kfree (ctrl->pci_bus);		ctrl->hpc_ops->release_ctlr(ctrl);		tctrl = ctrl;		ctrl = ctrl->next;		kfree(tctrl);	}	for (loop = 0; loop < 256; loop++) {		next = pciehp_slot_list[loop];		while (next != NULL) {			free_pciehp_res(next->io_head);			free_pciehp_res(next->mem_head);			free_pciehp_res(next->p_mem_head);			free_pciehp_res(next->bus_head);			TempSlot = next;			next = next->next;			kfree(TempSlot);		}	}	/* Stop the notification mechanism */	pciehp_event_stop_thread();}