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>
1 file changed