summaryrefslogtreecommitdiffstats
path: root/drivers/dma/of-dma.c
diff options
context:
space:
mode:
authorCong Ding <dinggnu@gmail.com>2013-02-14 11:16:10 +0100
committerVinod Koul <vinod.koul@intel.com>2013-02-14 14:41:46 +0100
commite68b1130dfbb834a4a028df01133591aeb59d241 (patch)
tree364877c35c453e27590b1b43508ceb0f1928c942 /drivers/dma/of-dma.c
parentdw_dmac: apply default dma_mask if needed (diff)
downloadlinux-e68b1130dfbb834a4a028df01133591aeb59d241.tar.xz
linux-e68b1130dfbb834a4a028df01133591aeb59d241.zip
dma: of-dma.c: fix memory leakage
The memory allocated to ofdma might be a leakage when error occurs. Signed-off-by: Cong Ding <dinggnu@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/of-dma.c')
-rw-r--r--drivers/dma/of-dma.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c
index 59631b2c4666..583e50e3d47c 100644
--- a/drivers/dma/of-dma.c
+++ b/drivers/dma/of-dma.c
@@ -107,6 +107,7 @@ int of_dma_controller_register(struct device_node *np,
if (!nbcells) {
pr_err("%s: #dma-cells property is missing or invalid\n",
__func__);
+ kfree(ofdma);
return -EINVAL;
}