summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/f_midi.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-07 14:45:22 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-07 14:45:22 -0700
commitd4669bb1427cca46dfb4a0f789febee56deab47e (patch)
tree5da31c96bcaee62996db2d22e6e2327d8be1321a /drivers/usb/gadget/function/f_midi.c
parentd770e558e21961ad6cfdf0ff7df0eb5d7d4f0754 (diff)
parentb2e2c94b878be2500d4d42c1f52a2fa1fe7648b4 (diff)
Merge tag 'fixes-for-v4.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
Felipe writes: usb: fixes for-v4.2-rc2 The first set of fixes for this -rc cycle. Most importantly we have a NULL pointer dereference fix on DWC3, a fix to a really old bug on musb_start() and another NULL pointer dereference fix on MXS phy driver. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/function/f_midi.c')
-rw-r--r--drivers/usb/gadget/function/f_midi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c
index 6316aa5b1c49..ad50a67c1465 100644
--- a/drivers/usb/gadget/function/f_midi.c
+++ b/drivers/usb/gadget/function/f_midi.c
@@ -1145,7 +1145,7 @@ static struct usb_function *f_midi_alloc(struct usb_function_instance *fi)
if (opts->id && !midi->id) {
status = -ENOMEM;
mutex_unlock(&opts->lock);
- goto kstrdup_fail;
+ goto setup_fail;
}
midi->in_ports = opts->in_ports;
midi->out_ports = opts->out_ports;
@@ -1164,8 +1164,6 @@ static struct usb_function *f_midi_alloc(struct usb_function_instance *fi)
return &midi->func;
-kstrdup_fail:
- f_midi_unregister_card(midi);
setup_fail:
for (--i; i >= 0; i--)
kfree(midi->in_port[i]);