Commit b130f03f authored by Maarten ter Huurne's avatar Maarten ter Huurne Committed by Felipe Balbi

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
......@@ -1937,7 +1937,8 @@ static int musb_gadget_stop(struct usb_gadget *g,
stop_activity(musb, driver);
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->gadget_driver = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment