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: Maarten ter Huurne <maarten@treewalker.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
0b5c1e62d8
commit
b130f03fd2
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue