[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1358209435-16429-1-git-send-email-dinggnu@gmail.com>
Date: Tue, 15 Jan 2013 01:23:48 +0100
From: Cong Ding <dinggnu@...il.com>
To: Vinod Koul <vinod.koul@...el.com>, Dan Williams <djbw@...com>,
Guennadi Liakhovetski <g.liakhovetski@....de>,
Paul Mundt <lethal@...ux-sh.org>, linux-kernel@...r.kernel.org
Cc: Cong Ding <dinggnu@...il.com>
Subject: [PATCH] dma: sh/shdma-base.c: remove unnecessary null pointer check
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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists