public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Syam Sidhardhan <syamsidhardh@gmail.com>
Cc: linux-kernel@vger.kernel.org, djbw@fb.com
Subject: Re: [PATCH] dma: imx-dma: Remove redundant NULL check before kfree
Date: Thu, 21 Mar 2013 14:37:37 +0530	[thread overview]
Message-ID: <20130321090737.GK10326@intel.com> (raw)
In-Reply-To: <1361747786-29597-1-git-send-email-s.syam@samsung.com>

On Mon, Feb 25, 2013 at 04:46:26AM +0530, Syam Sidhardhan wrote:
> kfree on NULL pointer is a no-op.
> 
> Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Applied thanks
> ---
>  drivers/dma/imx-dma.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
> index 70b8975..0988583 100644
> --- a/drivers/dma/imx-dma.c
> +++ b/drivers/dma/imx-dma.c
> @@ -859,8 +859,7 @@ static struct dma_async_tx_descriptor *imxdma_prep_dma_cyclic(
>  
>  	desc = list_first_entry(&imxdmac->ld_free, struct imxdma_desc, node);
>  
> -	if (imxdmac->sg_list)
> -		kfree(imxdmac->sg_list);
> +	kfree(imxdmac->sg_list);
>  
>  	imxdmac->sg_list = kcalloc(periods + 1,
>  			sizeof(struct scatterlist), GFP_KERNEL);
> -- 
> 1.7.9.5
> 

      reply	other threads:[~2013-03-21  9:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-24 23:16 [PATCH] dma: imx-dma: Remove redundant NULL check before kfree Syam Sidhardhan
2013-03-21  9:07 ` 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=20130321090737.GK10326@intel.com \
    --to=vinod.koul@intel.com \
    --cc=djbw@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syamsidhardh@gmail.com \
    /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