From 9680b60ed79edaf52f84b65cbb20859bbb26cb68 Mon Sep 17 00:00:00 2001 From: Torsten Fleischer Date: Sun, 26 Oct 2014 19:33:13 +0800 Subject: [PATCH] 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 --- drivers/usb/chipidea/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 3df5005c554d..9bdc6bd73432 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; } -- 2.39.5