diff options
author | Syam Sidhardhan <syamsidhardh@gmail.com> | 2013-02-24 18:16:26 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-04-15 00:21:18 -0400 |
commit | 96a3713ebcf71ef94c3680422ee060a04c5bc365 (patch) | |
tree | 3e17a5d2f47d63c7f4a5779e05f477347e549298 /drivers | |
parent | 88ff6ab4a87bb736c1d900ac638f0329aca7d0c0 (diff) |
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')
-rw-r--r-- | drivers/dma/imx-dma.c | 3 |
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( | |||
859 | 859 | ||
860 | desc = list_first_entry(&imxdmac->ld_free, struct imxdma_desc, node); | 860 | desc = list_first_entry(&imxdmac->ld_free, struct imxdma_desc, node); |
861 | 861 | ||
862 | if (imxdmac->sg_list) | 862 | kfree(imxdmac->sg_list); |
863 | kfree(imxdmac->sg_list); | ||
864 | 863 | ||
865 | imxdmac->sg_list = kcalloc(periods + 1, | 864 | imxdmac->sg_list = kcalloc(periods + 1, |
866 | sizeof(struct scatterlist), GFP_KERNEL); | 865 | sizeof(struct scatterlist), GFP_KERNEL); |