From: Syam Sidhardhan Date: Sun, 24 Feb 2013 23:16:26 +0000 (+0530) Subject: dma: imx-dma: Remove redundant NULL check before kfree X-Git-Tag: upstream/snapshot3+hdmi~5139^2~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96a3713ebcf71ef94c3680422ee060a04c5bc365;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git dma: imx-dma: Remove redundant NULL check before kfree kfree on NULL pointer is a no-op. Signed-off-by: Syam Sidhardhan Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index 7d08ab7..f285833 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);