Explorar o código

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 <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Chen %!s(int64=12) %!d(string=hai) anos
pai
achega
222bed9b2d
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      drivers/usb/chipidea/core.c

+ 1 - 0
drivers/usb/chipidea/core.c

@@ -605,6 +605,7 @@ static int ci_hdrc_remove(struct platform_device *pdev)
 	dbg_remove_files(ci);
 	dbg_remove_files(ci);
 	free_irq(ci->irq, ci);
 	free_irq(ci->irq, ci);
 	ci_role_destroy(ci);
 	ci_role_destroy(ci);
+	kfree(ci->hw_bank.regmap);
 
 
 	return 0;
 	return 0;
 }
 }