From: Peter Chen Date: Sat, 31 Dec 2011 06:56:47 +0000 (+0800) Subject: ENGR00171043 gadget-audio: Kernel panic after insert g_audio at second time X-Git-Tag: v3.0.35-fsl~1677 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=aa28dcda32885f63a3f2e41554944f157169332e;p=karo-tx-linux.git ENGR00171043 gadget-audio: Kernel panic after insert g_audio at second time The reason is it does not call usb_ep_disable at gadget disable routine. Signed-off-by: Peter Chen --- diff --git a/drivers/usb/gadget/f_audio.c b/drivers/usb/gadget/f_audio.c index 325bfb4e090c..62e2122dbbe3 100644 --- a/drivers/usb/gadget/f_audio.c +++ b/drivers/usb/gadget/f_audio.c @@ -644,6 +644,10 @@ static int f_audio_set_alt(struct usb_function *f, unsigned intf, unsigned alt) static void f_audio_disable(struct usb_function *f) { + struct f_audio *audio = func_to_audio(f); + + usb_ep_disable(audio->out_ep); + return; }