lkml.org 
[lkml]   [2014]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] usb: chipidea: Fix oops when removing the ci_hdrc module
On Fri, Oct 03, 2014 at 11:01:20AM +0200, Torsten Fleischer wrote:
> 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>
> ---
> 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 619d13e..4ecb650 100644
> --- a/drivers/usb/chipidea/core.c
> +++ b/drivers/usb/chipidea/core.c
> @@ -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;
> }
> --
> 1.8.4.5
>

Good fix, applied, thanks.

--
Best Regards,
Peter Chen


\
 
 \ /
  Last update: 2014-10-04 05:21    [W:0.025 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site