Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338627
b: refs/heads/master
c: 7f2a926
h: refs/heads/master
i:
  338625: 45cb111
  338623: c126c1b
v: v3
  • Loading branch information
Sebastian Andrzej Siewior authored and Felipe Balbi committed Oct 31, 2012
1 parent 1e115ac commit 014dce2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d185039f7982eb82cf8d03b6fb6689587ca5af24
refs/heads/master: 7f2a9268b458b693160f02f0df2bafb83e128750
10 changes: 8 additions & 2 deletions trunk/drivers/usb/gadget/f_midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -882,18 +882,24 @@ f_midi_bind(struct usb_configuration *c, struct usb_function *f)
* both speeds
*/
/* copy descriptors, and track endpoint copies */
f->descriptors = usb_copy_descriptors(midi_function);
if (!f->descriptors)
goto fail_f_midi;
if (gadget_is_dualspeed(c->cdev->gadget)) {
bulk_in_desc.wMaxPacketSize = cpu_to_le16(512);
bulk_out_desc.wMaxPacketSize = cpu_to_le16(512);
f->hs_descriptors = usb_copy_descriptors(midi_function);
} else {
f->descriptors = usb_copy_descriptors(midi_function);
if (!f->hs_descriptors)
goto fail_f_midi;
}

kfree(midi_function);

return 0;

fail_f_midi:
kfree(midi_function);
usb_free_descriptors(f->hs_descriptors);
fail:
/* we might as well release our claims on endpoints */
if (midi->out_ep)
Expand Down

0 comments on commit 014dce2

Please sign in to comment.