usb: udc: core: fix error handling
authorPeter Chen <peter.chen@nxp.com>
Mon, 11 Jul 2016 01:58:16 +0000 (09:58 +0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 11 Aug 2016 12:09:47 +0000 (15:09 +0300)
commit17a1dc5e22d25ba374d8c8dd8d5bf10bd20d3265
tree05105553c37dd97d572545d3db3e2f0b8ed96565
parent7442e6db5bdd0dce4615205508301f9b22e502d6
usb: udc: core: fix error handling

The udc device needs to be deleted if error occurs

Fixes: 855ed04a3758 ("usb: gadget: udc-core: independent registration of
gadgets and gadget drivers")
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/core.c