From: Brian Downing Date: Sat, 4 Aug 2012 23:32:19 +0000 (-0500) Subject: usb: musb: Fix bad call to kfree() in musb_free X-Git-Tag: sz_154~31 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c64a0c545a29e95807b255975ada025ef5a25a7;p=pandora-kernel.git usb: musb: Fix bad call to kfree() in musb_free Commit 622859634a663c5e55d0e2a2cdbb55ac058d97b3 (usb: musb: drop a gigantic amount of ifdeferry) included this change: @@ -1901,11 +1844,7 @@ static void musb_free(struct musb *musb) dma_controller_destroy(c); } -#ifdef CONFIG_USB_MUSB_HDRC_HCD - usb_put_hcd(musb_to_hcd(musb)); -#else kfree(musb); -#endif } /* Since musb comes from struct usb_hcd's hcd_priv, which is allocated on the end of that struct, kfree'ing it is not going to work. Replace kfree(musb) with usb_put_hcd(musb_to_hcd(musb)), which appears to be the right thing to do here. Signed-off-by: Brian Downing Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed