usb: gadget: function: Remove redundant usb_free_all_descriptors
authorPavitrakumar Managutte <pavitra1729@gmail.com>
Wed, 22 Oct 2014 13:54:58 +0000 (19:24 +0530)
committerFelipe Balbi <balbi@ti.com>
Thu, 23 Oct 2014 18:57:24 +0000 (13:57 -0500)
commitd12a8727171c770990c246f0682f0af7859bb245
tree65f081be3d25e5b85187acbfb46d7a3f2f4fd727
parent1200a82a59b6aa65758ccc92c3447b98c53cd7a2
usb: gadget: function: Remove redundant usb_free_all_descriptors

Removed usb_free_all_descriptors in the bind functions, which
results in double-free corruption of the descriptors on error path.
The usb descriptors are allocated by usb_assign_descriptors.

Signed-off-by: Pavitrakumar Managutte <pavitra1729@gmail.com>
Reviewed-by: Robert Baldyga <r.baldyga@samsung.com>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_eem.c
drivers/usb/gadget/function/f_hid.c
drivers/usb/gadget/function/f_ncm.c
drivers/usb/gadget/function/f_obex.c
drivers/usb/gadget/function/f_phonet.c
drivers/usb/gadget/function/f_rndis.c
drivers/usb/gadget/function/f_subset.c
drivers/usb/gadget/function/f_uac2.c