提交 b130f03f 编写于 作者: M Maarten ter Huurne 提交者: 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: NMaarten ter Huurne <maarten@treewalker.org>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册