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>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dma: remove unnecessary null pointer check in mmp_pdma.c
Date: Sun, 20 Jan 2013 05:55:11 -0800	[thread overview]
Message-ID: <20130120135511.GF23398@intel.com> (raw)
In-Reply-To: <1358209188-16350-1-git-send-email-dinggnu@gmail.com>

On Tue, Jan 15, 2013 at 01:19:48AM +0100, Cong Ding wrote:
> the pointer cfg is dereferenced in line 594, so it's no reason to check null
> again in line 620.
> 
> Signed-off-by: Cong Ding <dinggnu@gmail.com>
> ---
>  drivers/dma/mmp_pdma.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
> index c6d98c0..81d7b89 100644
> --- a/drivers/dma/mmp_pdma.c
> +++ b/drivers/dma/mmp_pdma.c
> @@ -617,10 +617,8 @@ static int mmp_pdma_control(struct dma_chan *dchan, enum dma_ctrl_cmd cmd,
>  		else if (maxburst == 32)
>  			chan->dcmd |= DCMD_BURST32;
>  
> -		if (cfg) {
> -			chan->dir = cfg->direction;
> -			chan->drcmr = cfg->slave_id;
> -		}
> +		chan->dir = cfg->direction;
> +		chan->drcmr = cfg->slave_id;
>  		chan->dev_addr = addr;
>  		break;
>  	default:
Applied, Thanks

--
~Vinod

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15  0:19 [PATCH] dma: remove unnecessary null pointer check in mmp_pdma.c 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=20130120135511.GF23398@intel.com \
    --to=vinod.koul@intel.com \
    --cc=dinggnu@gmail.com \
    --cc=djbw@fb.com \
    --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