]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
usb: chipidea: Fix memleak for ci->hw_bank.regmap when removal
authorPeter Chen <peter.chen@freescale.com>
Tue, 17 Sep 2013 04:37:21 +0000 (12:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Sep 2013 00:30:29 +0000 (17:30 -0700)
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>
drivers/usb/chipidea/core.c

index 94626409559a96a79c0d027023dbade8a645ce58..23763dcec069b2e8d1ba6dd140fc9cf644d2ddec 100644 (file)
@@ -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;
 }