Commit 855372c013bbad8369223f7c75242bd3c94f9345

Authored by Cong Ding
Committed by Vinod Koul
1 parent ed30933e6f

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@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>

Showing 1 changed file with 0 additions and 3 deletions Side-by-side Diff

drivers/dma/sh/shdma-base.c
... ... @@ -638,9 +638,6 @@
638 638 unsigned long flags;
639 639 int ret;
640 640  
641   - if (!chan)
642   - return -EINVAL;
643   -
644 641 switch (cmd) {
645 642 case DMA_TERMINATE_ALL:
646 643 spin_lock_irqsave(&schan->chan_lock, flags);