diff options
author | Cyril Roelandt <tipecaml@gmail.com> | 2013-02-12 07:52:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-13 13:41:44 -0500 |
commit | 79876e0394aa46e74267a5871c4f4469544dcacf (patch) | |
tree | 37ca7e70270fde1790243b149e539665964b7d62 | |
parent | c9af6db4c11ccc6c3e7f19bbc15d54023956f97c (diff) |
net: ethernet: ti: remove redundant NULL check.
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/ti/davinci_cpdma.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c index 198cf18dc7fc..7d3bffd3d64f 100644 --- a/drivers/net/ethernet/ti/davinci_cpdma.c +++ b/drivers/net/ethernet/ti/davinci_cpdma.c | |||
@@ -460,10 +460,8 @@ int cpdma_ctlr_destroy(struct cpdma_ctlr *ctlr) | |||
460 | if (ctlr->state != CPDMA_STATE_IDLE) | 460 | if (ctlr->state != CPDMA_STATE_IDLE) |
461 | cpdma_ctlr_stop(ctlr); | 461 | cpdma_ctlr_stop(ctlr); |
462 | 462 | ||
463 | for (i = 0; i < ARRAY_SIZE(ctlr->channels); i++) { | 463 | for (i = 0; i < ARRAY_SIZE(ctlr->channels); i++) |
464 | if (ctlr->channels[i]) | 464 | cpdma_chan_destroy(ctlr->channels[i]); |
465 | cpdma_chan_destroy(ctlr->channels[i]); | ||
466 | } | ||
467 | 465 | ||
468 | cpdma_desc_pool_destroy(ctlr->pool); | 466 | cpdma_desc_pool_destroy(ctlr->pool); |
469 | spin_unlock_irqrestore(&ctlr->lock, flags); | 467 | spin_unlock_irqrestore(&ctlr->lock, flags); |