mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
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>
This commit is contained in:
parent
877e86f283
commit
e68b1130df
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue