kfree(rxdr->ps_page); kfree(rxdr->ps_page_dma); 
e1000_setup_rx_resources(struct e1000_adapter *adapter){	struct e1000_desc_ring *rxdr = &adapter->rx_ring;	struct pci_dev *pdev = adapter->pdev;	int size;	size = sizeof(struct e1000_buffer) * rxdr->count;	rxdr->buffer_info = vmalloc(size);	if(!rxdr->buffer_info) {		DPRINTK(PROBE, ERR, 		"Unable to Allocate Memory for the Recieve descriptor ring\n");		return -ENOMEM;	}	memset(rxdr->buffer_info, 0, size);	/* Round up to nearest 4K */	rxdr->size = rxdr->count * sizeof(struct e1000_rx_desc);	E1000_ROUNDUP(rxdr->size, 4096);	rxdr->desc = pci_alloc_consistent(pdev, rxdr->size, &rxdr->dma);	if(!rxdr->desc) {setup_rx_desc_die:		DPRINTK(PROBE, ERR, 		"Unble to Allocate Memory for the Recieve descriptor ring\n");		vfree(rxdr->buffer_info);		return -ENOMEM;	}	/* fix for errata 23, cant cross 64kB boundary */	if (!e1000_check_64k_bound(adapter, rxdr->desc, rxdr->size)) {		void *olddesc = rxdr->desc;		dma_addr_t olddma = rxdr->dma;		DPRINTK(RX_ERR,ERR,			"rxdr align check failed: %u bytes at %p\n",			rxdr->size, rxdr->desc);		/* try again, without freeing the previous */		rxdr->desc = pci_alloc_consistent(pdev, rxdr->size, &rxdr->dma);		/* failed allocation, critial failure */		if(!rxdr->desc) {			pci_free_consistent(pdev, rxdr->size, olddesc, olddma);			goto setup_rx_desc_die;		}		if (!e1000_check_64k_bound(adapter, rxdr->desc, rxdr->size)) {			/* give up */			pci_free_consistent(pdev, rxdr->size,			     rxdr->desc, rxdr->dma);			pci_free_consistent(pdev, rxdr->size, olddesc, olddma);			DPRINTK(PROBE, ERR, 				"Unable to Allocate aligned Memory for the"				" Receive descriptor ring\n");			vfree(rxdr->buffer_info);			return -ENOMEM;		} else {			/* free old, move on with the new one since its okay */			pci_free_consistent(pdev, rxdr->size, olddesc, olddma);		}	}	memset(rxdr->desc, 0, rxdr->size);	rxdr->next_to_clean = 0;	rxdr->next_to_use = 0;	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2d7edb923a823660b081bd4c660300ee19adca8d/e1000_main.c/clean/drivers/net/e1000/e1000_main.c