From: Sachin Kamat Date: Mon, 2 Sep 2013 07:51:18 +0000 (+0530) Subject: dma: imx-dma: Remove redundant NULL check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=06f8db4b646057240ae07f8b4afabbfae5958ae7;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git dma: imx-dma: Remove redundant NULL check kfree on a NULL pointer is a no-op. Null pointer check is not necessary. Signed-off-by: Sachin Kamat Acked-by: Sascha Hauer Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index ff2aab973b45..78f8ca5fccee 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -805,10 +805,8 @@ static void imxdma_free_chan_resources(struct dma_chan *chan) } INIT_LIST_HEAD(&imxdmac->ld_free); - if (imxdmac->sg_list) { - kfree(imxdmac->sg_list); - imxdmac->sg_list = NULL; - } + kfree(imxdmac->sg_list); + imxdmac->sg_list = NULL; } static struct dma_async_tx_descriptor *imxdma_prep_slave_sg(