[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130120135541.GG23398@intel.com>
Date: Sun, 20 Jan 2013 05:55:41 -0800
From: Vinod Koul <vinod.koul@...el.com>
To: Cong Ding <dinggnu@...il.com>
Cc: Dan Williams <djbw@...com>,
Guennadi Liakhovetski <g.liakhovetski@....de>,
Paul Mundt <lethal@...ux-sh.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dma: sh/shdma-base.c: remove unnecessary null pointer
check
On Tue, Jan 15, 2013 at 01:23:48AM +0100, Cong Ding wrote:
> 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@...il.com>
> ---
> drivers/dma/sh/shdma-base.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c
> index f4cd946..4acb85a 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);
Applied, Thanks
--
~Vinod
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists