]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: gadget: avoid memory leak when failing to allocate all eps
authorDavid Cohen <david.a.cohen@linux.intel.com>
Thu, 12 Sep 2013 00:42:47 +0000 (17:42 -0700)
committerFelipe Balbi <balbi@ti.com>
Tue, 17 Sep 2013 16:05:01 +0000 (11:05 -0500)
commit3f737ed7d93badf75b6cada1e1a180090a0ad624
treec48ac2f81d78af981ea2415b4a6dc10178956c6d
parent42f80bb1131d0270c477948b230ea86bbe289852
usb: dwc3: gadget: avoid memory leak when failing to allocate all eps

If dwc3_gadget_init_endpoint() fails after allocate some of the eps, we
need to free their memory to avoid leak.

Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c