From: Cong Ding <dinggnu@gmail.com>
To: Vinod Koul <vinod.koul@intel.com>, Dan Williams <djbw@fb.com>,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Paul Mundt <lethal@linux-sh.org>,
linux-kernel@vger.kernel.org
Cc: Cong Ding <dinggnu@gmail.com>
Subject: [PATCH] dma: sh/shdma-base.c: remove unnecessary null pointer check
Date: Tue, 15 Jan 2013 01:23:48 +0100 [thread overview]
Message-ID: <1358209435-16429-1-git-send-email-dinggnu@gmail.com> (raw)
the variable chan is dereferenced in line 635, so it is no reason to check
null again in line 641.
Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
drivers/dma/sh/shdma-base.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c
index f4cd946..4acb85a 100644
--- a/drivers/dma/sh/shdma-base.c
+++ b/drivers/dma/sh/shdma-base.c
@@ -638,9 +638,6 @@ static int shdma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
unsigned long flags;
int ret;
- if (!chan)
- return -EINVAL;
-
switch (cmd) {
case DMA_TERMINATE_ALL:
spin_lock_irqsave(&schan->chan_lock, flags);
--
1.7.10.4
next reply other threads:[~2013-01-15 0:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 0:23 Cong Ding [this message]
2013-01-20 13:55 ` [PATCH] dma: sh/shdma-base.c: remove unnecessary null pointer check Vinod Koul
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=1358209435-16429-1-git-send-email-dinggnu@gmail.com \
--to=dinggnu@gmail.com \
--cc=djbw@fb.com \
--cc=g.liakhovetski@gmx.de \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vinod.koul@intel.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