* Remove bogus memset from cpqfc driver.
@ 2004-09-03 20:47 Dave Jones
0 siblings, 0 replies; only message in thread
From: Dave Jones @ 2004-09-03 20:47 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Linux Kernel
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@redhat.com>
--- 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!!
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-09-03 20:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-03 20:47 Remove bogus memset from cpqfc driver Dave Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.