diff options
author | Maarten ter Huurne <maarten@treewalker.org> | 2013-08-19 02:24:08 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-08-27 15:16:57 -0400 |
commit | b130f03fd2b156ba0d1f82f8b3d9624fe342753e (patch) | |
tree | 2b8973aafaa1a7b49f99e4a70c821b5f19200271 | |
parent | 0b5c1e62d80c8ee43b9f8435fe54ed097dba6a3c (diff) |
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>
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 696e9e0b05af..b7b8b2bc4ee9 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -1937,7 +1937,8 @@ static int musb_gadget_stop(struct usb_gadget *g, | |||
1937 | stop_activity(musb, driver); | 1937 | stop_activity(musb, driver); |
1938 | otg_set_peripheral(musb->xceiv->otg, NULL); | 1938 | otg_set_peripheral(musb->xceiv->otg, NULL); |
1939 | 1939 | ||
1940 | dev_dbg(musb->controller, "unregistering driver %s\n", driver->function); | 1940 | dev_dbg(musb->controller, "unregistering driver %s\n", |
1941 | driver ? driver->function : "(removed)"); | ||
1941 | 1942 | ||
1942 | musb->is_active = 0; | 1943 | musb->is_active = 0; |
1943 | musb->gadget_driver = NULL; | 1944 | musb->gadget_driver = NULL; |