drivers/ieee1394/ohci1394.c: function calls without effect
From: Adrian Bunk
Date: Thu Mar 09 2006 - 06:39:15 EST
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
-
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/