提交 e68b1130 编写于 作者: C Cong Ding 提交者: Vinod Koul

dma: of-dma.c: fix memory leakage

The memory allocated to ofdma might be a leakage when error occurs.
Signed-off-by: NCong Ding <dinggnu@gmail.com>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 877e86f2
...@@ -107,6 +107,7 @@ int of_dma_controller_register(struct device_node *np, ...@@ -107,6 +107,7 @@ int of_dma_controller_register(struct device_node *np,
if (!nbcells) { if (!nbcells) {
pr_err("%s: #dma-cells property is missing or invalid\n", pr_err("%s: #dma-cells property is missing or invalid\n",
__func__); __func__);
kfree(ofdma);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册