[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130321090737.GK10326@intel.com>
Date: Thu, 21 Mar 2013 14:37:37 +0530
From: Vinod Koul <vinod.koul@...el.com>
To: Syam Sidhardhan <syamsidhardh@...il.com>
Cc: linux-kernel@...r.kernel.org, djbw@...com
Subject: Re: [PATCH] dma: imx-dma: Remove redundant NULL check before kfree
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@...sung.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
>
--
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