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

No differences found