Skip to contentSkip to conversation

Remove bogus memset from cpqfc driver.

PATCH Dave Jones 1 participant 1 message Sep 3, 2004 SCSI

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

Not that this driver compiles, but coverity picked up this nonsense. If the pci_alloc_consistent fails, we go boom.
Amusingly, after the ==NULL check, is an identical memset.

drivers/scsi/cpqfcTScontrol.c renamed from drivers/scsi/cpqfcTScontrol.c~ +0 -1
@@ -116,7 +116,6 @@
   cpqfcHBAdata->fcLQ = pci_alloc_consistent(cpqfcHBAdata->PciDev,
 				 sizeof( FC_LINK_QUE), &cpqfcHBAdata->fcLQ_dma_handle);
   /* printk("@ %p (%u elements)\n", cpqfcHBAdata->fcLQ, FC_LINKQ_DEPTH); */
-  memset( cpqfcHBAdata->fcLQ, 0, sizeof( FC_LINK_QUE));
 
   if( cpqfcHBAdata->fcLQ == NULL ) // fatal error!!
   {