usb: gadget: dwc2: fix memory leak in gadget_init()
authorGrigor Tovmasyan <Grigor.Tovmasyan@synopsys.com>
Thu, 24 May 2018 14:22:30 +0000 (18:22 +0400)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 19 Jun 2018 09:48:14 +0000 (12:48 +0300)
commit9bb073a053f0464ea74a4d4c331fdb7da58568d6
tree9327045eefd467b1a6e7f95e30b3eca167fef996
parent980900d6318066b9f8314bfb87329a20fd0d1ca4
usb: gadget: dwc2: fix memory leak in gadget_init()

Freed allocated request for ep0 to prevent memory leak in case when
dwc2_driver_probe() failed.

Cc: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Grigor Tovmasyan <tovmasya@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c