summaryrefslogtreecommitdiffstats
path: root/drivers/dma/imx-dma.c
diff options
context:
space:
mode:
authorSyam Sidhardhan <syamsidhardh@gmail.com>2013-02-25 00:16:26 +0100
committerVinod Koul <vinod.koul@intel.com>2013-04-15 06:21:18 +0200
commit96a3713ebcf71ef94c3680422ee060a04c5bc365 (patch)
tree3e17a5d2f47d63c7f4a5779e05f477347e549298 /drivers/dma/imx-dma.c
parentdma: ipu: ipu_idmac: Fix section mismatch (diff)
downloadlinux-96a3713ebcf71ef94c3680422ee060a04c5bc365.tar.xz
linux-96a3713ebcf71ef94c3680422ee060a04c5bc365.zip
dma: imx-dma: Remove redundant NULL check before kfree
kfree on NULL pointer is a no-op. Signed-off-by: Syam Sidhardhan <s.syam@samsung.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/imx-dma.c')
-rw-r--r--drivers/dma/imx-dma.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index 7d08ab7ff444..f28583370d00 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -859,8 +859,7 @@ static struct dma_async_tx_descriptor *imxdma_prep_dma_cyclic(
desc = list_first_entry(&imxdmac->ld_free, struct imxdma_desc, node);
- if (imxdmac->sg_list)
- kfree(imxdmac->sg_list);
+ kfree(imxdmac->sg_list);
imxdmac->sg_list = kcalloc(periods + 1,
sizeof(struct scatterlist), GFP_KERNEL);