diff options
Diffstat (limited to 'drivers/usb/gadget/legacy/dbgp.c')
-rw-r--r-- | drivers/usb/gadget/legacy/dbgp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/legacy/dbgp.c b/drivers/usb/gadget/legacy/dbgp.c index 986fc511a2ed..225e385a6160 100644 --- a/drivers/usb/gadget/legacy/dbgp.c +++ b/drivers/usb/gadget/legacy/dbgp.c | |||
@@ -222,10 +222,12 @@ static void dbgp_unbind(struct usb_gadget *gadget) | |||
222 | { | 222 | { |
223 | #ifdef CONFIG_USB_G_DBGP_SERIAL | 223 | #ifdef CONFIG_USB_G_DBGP_SERIAL |
224 | kfree(dbgp.serial); | 224 | kfree(dbgp.serial); |
225 | dbgp.serial = NULL; | ||
225 | #endif | 226 | #endif |
226 | if (dbgp.req) { | 227 | if (dbgp.req) { |
227 | kfree(dbgp.req->buf); | 228 | kfree(dbgp.req->buf); |
228 | usb_ep_free_request(gadget->ep0, dbgp.req); | 229 | usb_ep_free_request(gadget->ep0, dbgp.req); |
230 | dbgp.req = NULL; | ||
229 | } | 231 | } |
230 | 232 | ||
231 | gadget->ep0->driver_data = NULL; | 233 | gadget->ep0->driver_data = NULL; |