Skip to content

Commit

Permalink
dma: sh/shdma-base.c: remove unnecessary null pointer check
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Cong Ding authored and Vinod Koul committed Jan 20, 2013
1 parent ed30933 commit 855372c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/dma/sh/shdma-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 855372c

Please sign in to comment.