public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/ieee1394/ohci1394.c: function calls without effect
@ 2006-03-09 11:41 Adrian Bunk
  2006-03-09 13:18 ` [PATCH] " Stefan Richter
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2006-03-09 11:41 UTC (permalink / raw)
  To: bcollins, scjody; +Cc: linux1394-devel, linux-kernel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-03-09 14:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-09 11:41 drivers/ieee1394/ohci1394.c: function calls without effect Adrian Bunk
2006-03-09 13:18 ` [PATCH] " Stefan Richter
2006-03-09 13:51   ` Adrian Bunk
2006-03-09 14:06     ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox