usb: gadget: fotg210-udc: Fix memory leak of fotg210->ep[i]
authorAnton Vasilyev <vasilyev@ispras.ru>
Tue, 7 Aug 2018 11:44:48 +0000 (14:44 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 29 Aug 2018 07:00:22 +0000 (10:00 +0300)
commitc37bd52836296ecc9a0fc8060b819089aebdbcde
treee04d6148217318c851cab7f251327ecdd43f3648
parentdec3c23c9aa1815f07d98ae0375b4cbc10971e13
usb: gadget: fotg210-udc: Fix memory leak of fotg210->ep[i]

There is no deallocation of fotg210->ep[i] elements, allocated at
fotg210_udc_probe.

The patch adds deallocation of fotg210->ep array elements and simplifies
error path of fotg210_udc_probe().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/fotg210-udc.c