diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-09-02 09:51:18 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-09-02 14:05:58 +0200 |
commit | 06f8db4b646057240ae07f8b4afabbfae5958ae7 (patch) | |
tree | 78b11a22348405f601eb09efca5aa699d1064a6a /drivers/dma/imx-dma.c | |
parent | dma: dmagengine: fix function names in comments (diff) | |
download | linux-06f8db4b646057240ae07f8b4afabbfae5958ae7.tar.xz linux-06f8db4b646057240ae07f8b4afabbfae5958ae7.zip |
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.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) } 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( |