From: Sebastian Andrzej Siewior Date: Mon, 22 Oct 2012 20:15:02 +0000 (+0200) Subject: usb: gadget: midi: free hs descriptors X-Git-Tag: v3.2.36~130 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=75387cc29c261fef4fac1a3f85433c8b862870f5;p=karo-tx-linux.git usb: gadget: midi: free hs descriptors commit d185039f7982eb82cf8d03b6fb6689587ca5af24 upstream. The HS descriptors are only created if HS is supported by the UDC but we never free them. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Felipe Balbi Signed-off-by: Ben Hutchings --- diff --git a/drivers/usb/gadget/f_midi.c b/drivers/usb/gadget/f_midi.c index 3797b3d6c622..dfd7b98f3d27 100644 --- a/drivers/usb/gadget/f_midi.c +++ b/drivers/usb/gadget/f_midi.c @@ -416,6 +416,7 @@ static void f_midi_unbind(struct usb_configuration *c, struct usb_function *f) midi->id = NULL; usb_free_descriptors(f->descriptors); + usb_free_descriptors(f->hs_descriptors); kfree(midi); }