if (ioc->spi_data.nvram != NULL) { kfree(ioc->spi_data.nvram); ioc->spi_data.nvram = NULL; }  if (ioc->spi_data.pIocPg3 != NULL) { kfree(ioc->spi_data.pIocPg3); ioc->spi_data.pIocPg3 = NULL; } 
kfree(ioc->spi_data.nvram); kfree(ioc->spi_data.pIocPg3); ioc->spi_data.nvram = NULL; ioc->spi_data.pIocPg3 = NULL; 
mpt_adapter_disable(MPT_ADAPTER *ioc){	int sz;	int ret;	if (ioc->cached_fw != NULL) {		ddlprintk((KERN_INFO MYNAM ": mpt_adapter_disable: Pushing FW onto adapter\n"));		if ((ret = mpt_downloadboot(ioc, NO_SLEEP)) < 0) {			printk(KERN_WARNING MYNAM				": firmware downloadboot failure (%d)!\n", ret);		}	}	/* Disable adapter interrupts! */	CHIPREG_WRITE32(&ioc->chip->IntMask, 0xFFFFFFFF);	ioc->active = 0;	/* Clear any lingering interrupt */	CHIPREG_WRITE32(&ioc->chip->IntStatus, 0);	if (ioc->alloc != NULL) {		sz = ioc->alloc_sz;		dexitprintk((KERN_INFO MYNAM ": %s.free  @ %p, sz=%d bytes\n",		 	ioc->name, ioc->alloc, ioc->alloc_sz));		pci_free_consistent(ioc->pcidev, sz,				ioc->alloc, ioc->alloc_dma);		ioc->reply_frames = NULL;		ioc->req_frames = NULL;		ioc->alloc = NULL;		ioc->alloc_total -= sz;	}	if (ioc->sense_buf_pool != NULL) {		sz = (ioc->req_depth * MPT_SENSE_BUFFER_ALLOC);		pci_free_consistent(ioc->pcidev, sz,				ioc->sense_buf_pool, ioc->sense_buf_pool_dma);		ioc->sense_buf_pool = NULL;		ioc->alloc_total -= sz;	}	if (ioc->events != NULL){		sz = MPTCTL_EVENT_LOG_SIZE * sizeof(MPT_IOCTL_EVENTS);		kfree(ioc->events);		ioc->events = NULL;		ioc->alloc_total -= sz;	}	if (ioc->cached_fw != NULL) {		sz = ioc->facts.FWImageSize;		pci_free_consistent(ioc->pcidev, sz,			ioc->cached_fw, ioc->cached_fw_dma);		ioc->cached_fw = NULL;		ioc->alloc_total -= sz;	}	if (ioc->spi_data.nvram != NULL) {		kfree(ioc->spi_data.nvram);		ioc->spi_data.nvram = NULL;	}	if (ioc->spi_data.pIocPg3 != NULL) {		kfree(ioc->spi_data.pIocPg3);		ioc->spi_data.pIocPg3 = NULL;	}	if (ioc->spi_data.pIocPg4 != NULL) {		sz = ioc->spi_data.IocPg4Sz;		pci_free_consistent(ioc->pcidev, sz, 			ioc->spi_data.pIocPg4,			ioc->spi_data.IocPg4_dma);		ioc->spi_data.pIocPg4 = NULL;		ioc->alloc_total -= sz;	}	if (ioc->ReqToChain != NULL) {		kfree(ioc->ReqToChain);		kfree(ioc->RequestNB);		ioc->ReqToChain = NULL;	}	if (ioc->ChainToChain != NULL) {		kfree(ioc->ChainToChain);		ioc->ChainToChain = NULL;	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d485eb830576eef911727b1347402e9a708998a2/mptbase.c/buggy/drivers/message/fusion/mptbase.c