public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Cong Ding <dinggnu@gmail.com>
Cc: Dan Williams <djbw@fb.com>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Paul Mundt <lethal@linux-sh.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dma: sh/shdma-base.c: remove unnecessary null pointer check
Date: Sun, 20 Jan 2013 05:55:41 -0800	[thread overview]
Message-ID: <20130120135541.GG23398@intel.com> (raw)
In-Reply-To: <1358209435-16429-1-git-send-email-dinggnu@gmail.com>

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@gmail.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

      reply	other threads:[~2013-01-20 14:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15  0:23 [PATCH] dma: sh/shdma-base.c: remove unnecessary null pointer check Cong Ding
2013-01-20 13:55 ` Vinod Koul [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130120135541.GG23398@intel.com \
    --to=vinod.koul@intel.com \
    --cc=dinggnu@gmail.com \
    --cc=djbw@fb.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox