* [PATCH] dma: sh/shdma-base.c: remove unnecessary null pointer check
@ 2013-01-15 0:23 Cong Ding
2013-01-20 13:55 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Cong Ding @ 2013-01-15 0:23 UTC (permalink / raw)
To: Vinod Koul, Dan Williams, Guennadi Liakhovetski, Paul Mundt,
linux-kernel
Cc: Cong Ding
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dma: sh/shdma-base.c: remove unnecessary null pointer check
2013-01-15 0:23 [PATCH] dma: sh/shdma-base.c: remove unnecessary null pointer check Cong Ding
@ 2013-01-20 13:55 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2013-01-20 13:55 UTC (permalink / raw)
To: Cong Ding; +Cc: Dan Williams, Guennadi Liakhovetski, Paul Mundt, linux-kernel
On Tue, Jan 15, 2013 at 01:23:48AM +0100, Cong Ding wrote:
> 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);
Applied, Thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-20 14:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-15 0:23 [PATCH] dma: sh/shdma-base.c: remove unnecessary null pointer check Cong Ding
2013-01-20 13:55 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox