diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-09-02 03:51:18 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-09-02 08:05:58 -0400 |
commit | 06f8db4b646057240ae07f8b4afabbfae5958ae7 (patch) | |
tree | 78b11a22348405f601eb09efca5aa699d1064a6a | |
parent | 6b9019a7f0b4958230df6563ccd585b858145991 (diff) |
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 <sachin.kamat@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/imx-dma.c | 6 |
1 files changed, 2 insertions, 4 deletions
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) | |||
805 | } | 805 | } |
806 | INIT_LIST_HEAD(&imxdmac->ld_free); | 806 | INIT_LIST_HEAD(&imxdmac->ld_free); |
807 | 807 | ||
808 | if (imxdmac->sg_list) { | 808 | kfree(imxdmac->sg_list); |
809 | kfree(imxdmac->sg_list); | 809 | imxdmac->sg_list = NULL; |
810 | imxdmac->sg_list = NULL; | ||
811 | } | ||
812 | } | 810 | } |
813 | 811 | ||
814 | static struct dma_async_tx_descriptor *imxdma_prep_slave_sg( | 812 | static struct dma_async_tx_descriptor *imxdma_prep_slave_sg( |