From 855372c013bbad8369223f7c75242bd3c94f9345 Mon Sep 17 00:00:00 2001 From: Cong Ding Date: Tue, 15 Jan 2013 01:23:48 +0100 Subject: 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 Signed-off-by: Vinod Koul --- drivers/dma/sh/shdma-base.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/dma/sh') diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c index f4cd946d259d..4acb85a10250 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); -- cgit v1.2.3