From: Cong Ding Date: Thu, 14 Feb 2013 10:16:10 +0000 (+0100) Subject: dma: of-dma.c: fix memory leakage X-Git-Tag: firefly_0821_release~3680^2~965^2~14 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e68b1130dfbb834a4a028df01133591aeb59d241;p=firefly-linux-kernel-4.4.55.git dma: of-dma.c: fix memory leakage The memory allocated to ofdma might be a leakage when error occurs. Signed-off-by: Cong Ding Signed-off-by: Vinod Koul --- 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; }