summaryrefslogtreecommitdiff
path: root/drivers/dma/imx-dma.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-09-02 11:51:18 +0400
committerVinod Koul <vinod.koul@intel.com>2013-09-02 16:05:58 +0400
commit06f8db4b646057240ae07f8b4afabbfae5958ae7 (patch)
tree78b11a22348405f601eb09efca5aa699d1064a6a /drivers/dma/imx-dma.c
parent6b9019a7f0b4958230df6563ccd585b858145991 (diff)
downloadlinux-06f8db4b646057240ae07f8b4afabbfae5958ae7.tar.xz
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>
Diffstat (limited to 'drivers/dma/imx-dma.c')
-rw-r--r--drivers/dma/imx-dma.c6
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)
}
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(