From: Cyril Roelandt <tipecaml@gmail.com>
To: davem@davemloft.net
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
mugunthanvnm@ti.com, zonque@gmail.com, hotforest@gmail.com,
Julia.Lawall@lip6.fr, netdev@vger.kernel.org,
Cyril Roelandt <tipecaml@gmail.com>
Subject: [PATCH] net: ethernet: ti: remove redundant NULL check.
Date: Tue, 12 Feb 2013 22:54:46 +0100 [thread overview]
Message-ID: <1360706086-31506-1-git-send-email-tipecaml@gmail.com> (raw)
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
next reply other threads:[~2013-02-12 22:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-12 21:54 Cyril Roelandt [this message]
2013-02-12 22:06 ` [PATCH] net: ethernet: ti: remove redundant NULL check 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
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=1360706086-31506-1-git-send-email-tipecaml@gmail.com \
--to=tipecaml@gmail.com \
--cc=Julia.Lawall@lip6.fr \
--cc=davem@davemloft.net \
--cc=hotforest@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mugunthanvnm@ti.com \
--cc=netdev@vger.kernel.org \
--cc=zonque@gmail.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 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).