]> git.itanic.dy.fi Git - linux-stable/commit
usb: udc: core: add device_del() call to error pathway
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 16 Jan 2015 16:32:51 +0000 (11:32 -0500)
committerFelipe Balbi <balbi@ti.com>
Mon, 3 Aug 2015 14:54:18 +0000 (09:54 -0500)
commitc93e64e91248becd0edb8f01723dff9da890e2ab
tree9a1cf171d28a42d5fd4c2dd1e311d01e8c8998cf
parent4248bd7d3e2c7c87ff695d812018b8c22b5a5ab1
usb: udc: core: add device_del() call to error pathway

This patch fixes a bug in the error pathway of
usb_add_gadget_udc_release() in udc-core.c.  If the udc registration
fails, the gadget registration is not fully undone; there's a
put_device(&gadget->dev) call but no device_del().

CC: <stable@vger.kernel.org>
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/udc/udc-core.c