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>
This commit is contained in:
parent
4248bd7d3e
commit
c93e64e912
@ -323,6 +323,7 @@ err4:
|
||||
|
||||
err3:
|
||||
put_device(&udc->dev);
|
||||
device_del(&gadget->dev);
|
||||
|
||||
err2:
|
||||
put_device(&gadget->dev);
|
||||
|
Loading…
x
Reference in New Issue
Block a user