From: Peter Chen Date: Tue, 17 Sep 2013 04:37:21 +0000 (+0800) Subject: usb: chipidea: Fix memleak for ci->hw_bank.regmap when removal X-Git-Tag: firefly_0821_release~176^2~5224^2~8 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=222bed9b2dff53e4402d4819d6fca09e26b765fb;p=firefly-linux-kernel-4.4.55.git usb: chipidea: Fix memleak for ci->hw_bank.regmap when removal It needs to free ci->hw_bank.regmap explicitly since it is not managed resource. Signed-off-by: Peter Chen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 94626409559a..23763dcec069 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -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; }