Skip to content

Commit

Permalink
dma: of-dma.c: fix memory leakage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Cong Ding authored and Vinod Koul committed Feb 14, 2013
1 parent 877e86f commit e68b113
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/dma/of-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e68b113

Please sign in to comment.