Skip to content
Snippets Groups Projects
Commit b130f03f authored by Maarten ter Huurne's avatar Maarten ter Huurne Committed by Felipe Balbi
Browse files

usb: musb: avoid null pointer dereference in debug logging


Since commit 511f3c53 (usb: gadget: udc-core: fix a regression during
gadget driver unbinding) usb_gadget_remove_driver will pass NULL for
the driver argument.

Signed-off-by: default avatarMaarten ter Huurne <maarten@treewalker.org>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 0b5c1e62
No related branches found
No related tags found
No related merge requests found
...@@ -1937,7 +1937,8 @@ static int musb_gadget_stop(struct usb_gadget *g, ...@@ -1937,7 +1937,8 @@ static int musb_gadget_stop(struct usb_gadget *g,
stop_activity(musb, driver); stop_activity(musb, driver);
otg_set_peripheral(musb->xceiv->otg, NULL); otg_set_peripheral(musb->xceiv->otg, NULL);
dev_dbg(musb->controller, "unregistering driver %s\n", driver->function); dev_dbg(musb->controller, "unregistering driver %s\n",
driver ? driver->function : "(removed)");
musb->is_active = 0; musb->is_active = 0;
musb->gadget_driver = NULL; musb->gadget_driver = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment