netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: ti: remove redundant NULL check.
@ 2013-02-12 21:54 Cyril Roelandt
  2013-02-12 22:06 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Cyril Roelandt @ 2013-02-12 21:54 UTC (permalink / raw)
  To: davem
  Cc: linux-kernel, kernel-janitors, mugunthanvnm, zonque, hotforest,
	Julia.Lawall, netdev, Cyril Roelandt

cpdma_chan_destroy() on a NULL pointer is a no-op, so the NULL check in
cpdma_ctlr_destroy() can safely be removed.

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
---
 drivers/net/ethernet/ti/davinci_cpdma.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
index f862918..aba787b 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -450,8 +450,7 @@ int cpdma_ctlr_destroy(struct cpdma_ctlr *ctlr)
 		cpdma_ctlr_stop(ctlr);
 
 	for (i = 0; i < ARRAY_SIZE(ctlr->channels); i++) {
-		if (ctlr->channels[i])
-			cpdma_chan_destroy(ctlr->channels[i]);
+		cpdma_chan_destroy(ctlr->channels[i]);
 	}
 
 	cpdma_desc_pool_destroy(ctlr->pool);
-- 
1.7.10.4

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

end of thread, other threads:[~2013-02-13 18:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-12 21:54 [PATCH] net: ethernet: ti: remove redundant NULL check Cyril Roelandt
2013-02-12 22:06 ` David Miller
2013-02-12 22:52   ` Cyril Roelandt
2013-02-13 18:41     ` David Miller
2013-02-12 22:54   ` Cyril Roelandt
2013-02-12 23:48     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).