]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
usb: chipidea: Fix oops when removing the ci_hdrc module
authorTorsten Fleischer <to-fleischer@t-online.de>
Fri, 3 Oct 2014 09:01:20 +0000 (11:01 +0200)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:18:18 +0000 (21:18 -0600)
The call of 'kfree(ci->hw_bank.regmap)' in ci_hdrc_remove() sometimes causes
a kernel oops when removing the ci_hdrc module.

Since there is no separate memory allocated for the ci->hw_bank.regmap array,
there is no need to free it.

Signed-off-by: Torsten Fleischer <to-fleischer@t-online.de>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
drivers/usb/chipidea/core.c

index 9e9dc64b0c5a3e877b1c1416df4ef49caffe8ad9..3a45fffbbe29e4d59cbe40a9b7e118099687fa0b 100644 (file)
@@ -740,7 +740,6 @@ static int ci_hdrc_remove(struct platform_device *pdev)
        ci_role_destroy(ci);
        ci_hdrc_enter_lpm(ci, true);
        usb_phy_shutdown(ci->transceiver);
-       kfree(ci->hw_bank.regmap);
 
        return 0;
 }