diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-11-01 18:08:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-11-01 18:08:04 -0400 |
commit | 528a506e4bcd77dfce5d405e73a95e340bb6e8fd (patch) | |
tree | 2ed701d69aea839b461ca8a9107a7b59692d3452 /drivers/usb/gadget/function/f_rndis.c | |
parent | 4f4274af7009890f0d4724909bf9038193955489 (diff) | |
parent | 9c19db5b11487da704d29dee48345c4841831bac (diff) |
Merge tag 'usb-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH:
"Here are a bunch of USB fixes for 3.18-rc3.
Mostly usb-serial device ids and gadget fixes for issues that have
been reported. Full details are in the shortlog.
All of these have been in linux-next for a while"
* tag 'usb-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (42 commits)
usb: chipidea: Fix oops when removing the ci_hdrc module
usb: gadget: function: Fixed the return value on error path
usb: dwc2: gadget: disable phy before turning off power regulators
usb: gadget: function: Remove redundant usb_free_all_descriptors
usb: dwc3: gadget: Properly initialize LINK TRB
usb: dwc2: gadget: fix gadget unregistration in udc_stop() function
usb: dwc2: Bits in bitfield should add up to 32
usb: dwc2: gadget: sparse warning of context imbalance
usb: gadget: udc: core: fix kernel oops with soft-connect
usb: musb: musb_dsps: fix NULL pointer in suspend
usb: musb: dsps: start OTG timer on resume again
usb: gadget: loopback: don't queue requests to bogus endpoints
usb: ffs: fix regression when quirk_ep_out_aligned_size flag is set
usb: gadget: f_fs: remove redundant ffs_data_get()
usb: gadget: udc: USB_GADGET_XILINX should depend on HAS_DMA
Revert "usb: dwc3: dwc3-omap: Disable/Enable only wrapper interrupts in prepare/complete"
usb: gadget: composite: enable BESL support
usb: musb: cppi41: restart hrtimer only if not yet done
usb: dwc3: ep0: fix Data Phase for transfer sizes aligned to wMaxPacketSize
usb: serial: ftdi_sio: add "bricked" FTDI device PID
...
Diffstat (limited to 'drivers/usb/gadget/function/f_rndis.c')
-rw-r--r-- | drivers/usb/gadget/function/f_rndis.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/gadget/function/f_rndis.c b/drivers/usb/gadget/function/f_rndis.c index ddb09dc6d1f2..f13fc6a58565 100644 --- a/drivers/usb/gadget/function/f_rndis.c +++ b/drivers/usb/gadget/function/f_rndis.c | |||
@@ -802,8 +802,10 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f) | |||
802 | 802 | ||
803 | if (rndis->manufacturer && rndis->vendorID && | 803 | if (rndis->manufacturer && rndis->vendorID && |
804 | rndis_set_param_vendor(rndis->config, rndis->vendorID, | 804 | rndis_set_param_vendor(rndis->config, rndis->vendorID, |
805 | rndis->manufacturer)) | 805 | rndis->manufacturer)) { |
806 | goto fail; | 806 | status = -EINVAL; |
807 | goto fail_free_descs; | ||
808 | } | ||
807 | 809 | ||
808 | /* NOTE: all that is done without knowing or caring about | 810 | /* NOTE: all that is done without knowing or caring about |
809 | * the network link ... which is unavailable to this code | 811 | * the network link ... which is unavailable to this code |
@@ -817,10 +819,11 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f) | |||
817 | rndis->notify->name); | 819 | rndis->notify->name); |
818 | return 0; | 820 | return 0; |
819 | 821 | ||
822 | fail_free_descs: | ||
823 | usb_free_all_descriptors(f); | ||
820 | fail: | 824 | fail: |
821 | kfree(f->os_desc_table); | 825 | kfree(f->os_desc_table); |
822 | f->os_desc_n = 0; | 826 | f->os_desc_n = 0; |
823 | usb_free_all_descriptors(f); | ||
824 | 827 | ||
825 | if (rndis->notify_req) { | 828 | if (rndis->notify_req) { |
826 | kfree(rndis->notify_req->buf); | 829 | kfree(rndis->notify_req->buf); |