]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
usb: chipidea: Fix oops when removing the ci_hdrc module
authorTorsten Fleischer <to-fleischer@t-online.de>
Sun, 26 Oct 2014 11:33:13 +0000 (19:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Nov 2014 18:10:34 +0000 (10:10 -0800)
commit 9680b60ed79edaf52f84b65cbb20859bbb26cb68 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/core.c

index 619d13e29995dc9ac5010081068528b0f4932d91..4ecb6501a7ea0a9cef488154c905d8f15f2a4093 100644 (file)
@@ -732,7 +732,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;
 }