Commit 26920e0f authored by Linyu Yuan's avatar Linyu Yuan Committed by Todd Kjos
Browse files

FROMLIST: usb: dwc3: avoid NULL access of usb_gadget_driver



we found crash in dwc3_disconnect_gadget(),
it is because dwc->gadget_driver become NULL before async access.
7dc0c55e ('USB: UDC core: Add udc_async_callbacks gadget op')
suggest a common way to avoid such kind of issue.

this change implment the callback in dwc3 and
change related functions which have callback to usb gadget driver.

Signed-off-by: default avatarLinyu Yuan <linyyuan@codeaurora.org>
Bug: 193006095
Link: https://lore.kernel.org/linux-usb/20210629015118.7944-1-linyyuan@codeaurora.org


Change-Id: Id6774f7f6b7c8d31338128ffc33f01f5575f4d16
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 5bb2dd8d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment