linux/drivers/dma/dw
Mans Rullgard 2b574ba9c5 dmaengine: dw: fix potential memory leak in dw_dma_parse_dt()
If the "dma-channels" DT property is missing, the dw_dma_parse_dt()
function return NULL, but not before allocating memory for a struct
dw_dma_platform_data through devres.  If the device supports parameter
detection, the probe still succeeds and the allocated memory is not
released until the device is removed.

Fix this by deferring the allocation until after checking the
"dma-channels" property.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2015-12-18 10:59:32 +05:30
..
core.c dmaengine updates for 4.4-rc1 2015-11-10 10:05:17 -08:00
internal.h dmaengine: dw: export probe()/remove() and Co to users 2014-10-15 20:31:05 +05:30
Kconfig dmaengine: sort the dw Kconfig 2015-08-24 13:58:18 +05:30
Makefile dma: dw: add PCI part of the driver 2013-07-05 11:40:45 +05:30
pci.c dmaengine: dw: use dw_dmac autoconfiguration in PCI driver 2015-09-30 13:43:09 +05:30
platform.c dmaengine: dw: fix potential memory leak in dw_dma_parse_dt() 2015-12-18 10:59:32 +05:30
regs.h dmaengine: dw: define DW_DMA_MAX_NR_MASTERS 2015-02-04 22:39:44 -08:00