usb: dwc2: gadget: fix fifo allocation leak
commit4556e12c9cf732343224308866dad2a12887dcd6
authorMian Yousaf Kaukab <yousaf.kaukab@intel.com>
Fri, 9 Jan 2015 12:39:05 +0000 (9 13:39 +0100)
committerFelipe Balbi <balbi@ti.com>
Mon, 12 Jan 2015 21:34:36 +0000 (12 15:34 -0600)
tree08fe62ac833983c05a423e9cc0061cfa0e27914c
parentca4c55ad89edb54b1eb04fe2d4c6915c9f8d69b9
usb: dwc2: gadget: fix fifo allocation leak

When selecting different alt setting, s3c_hsotg_ep_enable can be
called with fifo already allocated. Allocate fifo again only if
required and after deallocating the previous fifo.

Tested-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc2/gadget.c