Remove bogus memset from cpqfc driver.

From: Dave Jones
Date: Fri Sep 03 2004 - 15:57:12 EST


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.

Signed-off-by: Dave Jones <davej@xxxxxxxxxx>

--- linux-2.6.8/drivers/scsi/cpqfcTScontrol.c~ 2004-09-03 21:44:41.742800408 +0100
+++ linux-2.6.8/drivers/scsi/cpqfcTScontrol.c 2004-09-03 21:45:37.163375200 +0100
@@ -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!!
{
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/