aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-09-02 13:21:18 +0530
committerVinod Koul <vinod.koul@intel.com>2013-09-02 17:35:58 +0530
commit06f8db4b646057240ae07f8b4afabbfae5958ae7 (patch)
tree78b11a22348405f601eb09efca5aa699d1064a6a /drivers/dma
parent6b9019a7f0b4958230df6563ccd585b858145991 (diff)
downloadkernel_goldelico_gta04-06f8db4b646057240ae07f8b4afabbfae5958ae7.zip
kernel_goldelico_gta04-06f8db4b646057240ae07f8b4afabbfae5958ae7.tar.gz
kernel_goldelico_gta04-06f8db4b646057240ae07f8b4afabbfae5958ae7.tar.bz2
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')
-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 ff2aab9..78f8ca5 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(