diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2020-12-15 12:48:07 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-12-15 12:48:07 +0300 |
commit | 3c41e57a1e168d879e923c5583adeae47eec9f64 (patch) | |
tree | e6272012c4b766189be2821316a3d23d115f5195 /drivers/usb/gadget/function/f_midi.c | |
parent | d14ce74f1fb376ccbbc0b05ded477ada51253729 (diff) | |
parent | 2f5fbc4305d07725bfebaedb09e57271315691ef (diff) | |
download | linux-3c41e57a1e168d879e923c5583adeae47eec9f64.tar.xz |
Merge tag 'irqchip-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core
Pull irqchip updates for 5.11 from Marc Zyngier:
- Preliminary support for managed interrupts on platform devices
- Correctly identify allocation of MSIs proxyied by another device
- Remove the fasteoi IPI flow which has been proved useless
- Generalise the Ocelot support to new SoCs
- Improve GICv4.1 vcpu entry, matching the corresponding KVM optimisation
- Work around spurious interrupts on Qualcomm PDC
- Random fixes and cleanups
Link: https://lore.kernel.org/r/20201212135626.1479884-1-maz@kernel.org
Diffstat (limited to 'drivers/usb/gadget/function/f_midi.c')
-rw-r--r-- | drivers/usb/gadget/function/f_midi.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c index 85cb15734aa8..19d97940eeb9 100644 --- a/drivers/usb/gadget/function/f_midi.c +++ b/drivers/usb/gadget/function/f_midi.c @@ -1315,7 +1315,7 @@ static struct usb_function *f_midi_alloc(struct usb_function_instance *fi) midi->id = kstrdup(opts->id, GFP_KERNEL); if (opts->id && !midi->id) { status = -ENOMEM; - goto setup_fail; + goto midi_free; } midi->in_ports = opts->in_ports; midi->out_ports = opts->out_ports; @@ -1327,7 +1327,7 @@ static struct usb_function *f_midi_alloc(struct usb_function_instance *fi) status = kfifo_alloc(&midi->in_req_fifo, midi->qlen, GFP_KERNEL); if (status) - goto setup_fail; + goto midi_free; spin_lock_init(&midi->transmit_lock); @@ -1343,9 +1343,13 @@ static struct usb_function *f_midi_alloc(struct usb_function_instance *fi) return &midi->func; +midi_free: + if (midi) + kfree(midi->id); + kfree(midi); setup_fail: mutex_unlock(&opts->lock); - kfree(midi); + return ERR_PTR(status); } |