提交 06f8db4b 编写于 作者: S Sachin Kamat 提交者: Vinod Koul

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: NSachin Kamat <sachin.kamat@linaro.org>
Acked-by: NSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 6b9019a7
...@@ -805,10 +805,8 @@ static void imxdma_free_chan_resources(struct dma_chan *chan) ...@@ -805,10 +805,8 @@ static void imxdma_free_chan_resources(struct dma_chan *chan)
} }
INIT_LIST_HEAD(&imxdmac->ld_free); INIT_LIST_HEAD(&imxdmac->ld_free);
if (imxdmac->sg_list) { kfree(imxdmac->sg_list);
kfree(imxdmac->sg_list); imxdmac->sg_list = NULL;
imxdmac->sg_list = NULL;
}
} }
static struct dma_async_tx_descriptor *imxdma_prep_slave_sg( static struct dma_async_tx_descriptor *imxdma_prep_slave_sg(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册