]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
dma: sh/shdma-base.c: remove unnecessary null pointer check
authorCong Ding <dinggnu@gmail.com>
Tue, 15 Jan 2013 00:23:48 +0000 (01:23 +0100)
committerVinod Koul <vinod.koul@intel.com>
Sun, 20 Jan 2013 13:49:40 +0000 (05:49 -0800)
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>
drivers/dma/sh/shdma-base.c

index f4cd946d259db9939ce78c6443c9075fe8a3cb0f..4acb85a102508adda7e0a91201431b8549218522 100644 (file)
@@ -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);