From: Dave Jones <davej@redhat.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Remove bogus memset from cpqfc driver.
Date: Fri, 3 Sep 2004 21:47:52 +0100 [thread overview]
Message-ID: <20040903204752.GS26419@redhat.com> (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.
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!!
{
reply other threads:[~2004-09-03 20:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040903204752.GS26419@redhat.com \
--to=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox