From: Torsten Fleischer Date: Sun, 26 Oct 2014 11:33:13 +0000 (+0800) Subject: usb: chipidea: Fix oops when removing the ci_hdrc module X-Git-Tag: v3.18-rc3~9^2~1 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9680b60ed79edaf52f84b65cbb20859bbb26cb68;p=users%2Fdwmw2%2Flinux.git usb: chipidea: Fix oops when removing the ci_hdrc module 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. Cc: v3.14+ Signed-off-by: Torsten Fleischer 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 3df5005c554d2..9bdc6bd73432c 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -742,7 +742,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; }