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(). Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> CC: <stable@xxxxxxxxxxxxxxx> --- [as1772] drivers/usb/gadget/udc/udc-core.c | 1 + 1 file changed, 1 insertion(+) Index: usb-3.19/drivers/usb/gadget/udc/udc-core.c =================================================================== --- usb-3.19.orig/drivers/usb/gadget/udc/udc-core.c +++ usb-3.19/drivers/usb/gadget/udc/udc-core.c @@ -298,6 +298,7 @@ err4: err3: put_device(&udc->dev); + device_del(&gadget->dev); err2: put_device(&gadget->dev); -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html