mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
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
1 changed files with 1 additions and 0 deletions
|
|
@ -323,6 +323,7 @@ err4:
|
|||
|
||||
err3:
|
||||
put_device(&udc->dev);
|
||||
device_del(&gadget->dev);
|
||||
|
||||
err2:
|
||||
put_device(&gadget->dev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue