Skip to content

Commit

Permalink
usb: chipidea: Fix memleak for ci->hw_bank.regmap when removal
Browse files Browse the repository at this point in the history
It needs to free ci->hw_bank.regmap explicitly since it is not managed
resource.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Peter Chen authored and Greg Kroah-Hartman committed Sep 26, 2013
1 parent f84839d commit 222bed9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/chipidea/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ static int ci_hdrc_remove(struct platform_device *pdev)
dbg_remove_files(ci);
free_irq(ci->irq, ci);
ci_role_destroy(ci);
kfree(ci->hw_bank.regmap);

return 0;
}
Expand Down

0 comments on commit 222bed9

Please sign in to comment.