dma: sh/shdma-base.c: remove unnecessary null pointer check
PATCH 1/1 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 <[email protected]>
--- drivers/dma/sh/shdma-base.c | 3 --- 1 file changed, 3 deletions(-)
drivers/dma/sh/shdma-base.c +0 -3
@@ -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);
Signature · 1 line
1.7.10.4
Vinod Koul
AppliedQuoted 13 lines · 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 <[email protected]>--- drivers/dma/sh/shdma-base.c | 3 --- 1 file changed, 3 deletions(-)drivers/dma/sh/shdma-base.c +0
-0
drivers/dma/sh/shdma-base.c static int shdma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, · line 643
Quoted 9 lines
drivers/dma/sh/shdma-base.c +0
-3@@ -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