projects/linux·commit 9680b60e

usb: chipidea: Fix oops when removing the ci_hdrc module

9680b60e · Torsten Fleischer <[email protected]> · 2014-10-26 19:33:13 +08:00

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+ <stable@@vger.kernel.org>
Signed-off-by: Torsten Fleischer <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Commit
9680b60ed79edaf52f84b65cbb20859bbb26cb68
Parents
8071e6f8

Changes

1 files changed · +0 −1

FileStatusAddDelContent
drivers/usb/chipidea/core.cmodified+0−1View file

drivers/usb/chipidea/core.c

View file
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 3df5005..9bdc6bd 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;
}