usb: gadget: goku_udc: fix memory leak in goku_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 26 Aug 2016 00:06:02 +0000 (03:06 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 29 Aug 2016 07:48:54 +0000 (10:48 +0300)
commit2a334cfaf393187d592999d1039135e000a68e9a
tree253fab9f848f8987aa38762b14333e4c8c6c9109
parent01da51981d0e80ef6ccc44e48a278f70a88f6187
usb: gadget: goku_udc: fix memory leak in goku_probe()

Memory allocated for goku_udc device is not deallocated at error
paths in goku_probe(), because gadget_release() destructor
is not registered yet.

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

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/goku_udc.c