From: Adrian Bunk <bunk@stusta.de>
To: bcollins@debian.org, scjody@modernduck.com
Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: drivers/ieee1394/ohci1394.c: function calls without effect
Date: Thu, 9 Mar 2006 12:41:38 +0100 [thread overview]
Message-ID: <20060309114138.GA21864@stusta.de> (raw)
While investigating two (incorrect) errors of the Coverity checker, I
found the following in drivers/ieee1394/ohci1394.c:ohci1394_pci_remove():
/* Free IR dma */
free_dma_rcv_ctx(&ohci->ir_legacy_context);
/* Free IT dma */
free_dma_trm_ctx(&ohci->it_legacy_context);
/* Free IR legacy dma */
free_dma_rcv_ctx(&ohci->ir_legacy_context);
Both functions contain:
<-- snip -->
static void free_dma_rcv_ctx(struct dma_rcv_ctx *d)
{
int i;
struct ti_ohci *ohci = d->ohci;
if (ohci == NULL)
return;
...
/* Mark this context as freed. */
d->ohci = NULL;
}
<-- snip -->
There are no other return possibilities in these functions.
Therefore, the latter two of the three function calls above aren't doing
anything.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next reply other threads:[~2006-03-09 11:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-09 11:41 Adrian Bunk [this message]
2006-03-09 13:18 ` [PATCH] drivers/ieee1394/ohci1394.c: function calls without effect Stefan Richter
2006-03-09 13:51 ` Adrian Bunk
2006-03-09 14:06 ` Adrian Bunk
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=20060309114138.GA21864@stusta.de \
--to=bunk@stusta.de \
--cc=bcollins@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=scjody@modernduck.com \
/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 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.