diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/dbgp.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/gadget/dbgp.c b/drivers/usb/gadget/dbgp.c index e5ac8a316fec..2932b48da0f9 100644 --- a/drivers/usb/gadget/dbgp.c +++ b/drivers/usb/gadget/dbgp.c | |||
@@ -350,9 +350,9 @@ static int dbgp_setup(struct usb_gadget *gadget, | |||
350 | u8 request = ctrl->bRequest; | 350 | u8 request = ctrl->bRequest; |
351 | u16 value = le16_to_cpu(ctrl->wValue); | 351 | u16 value = le16_to_cpu(ctrl->wValue); |
352 | u16 length = le16_to_cpu(ctrl->wLength); | 352 | u16 length = le16_to_cpu(ctrl->wLength); |
353 | int err = 0; | 353 | int err = -EOPNOTSUPP; |
354 | void *data; | 354 | void *data = NULL; |
355 | u16 len; | 355 | u16 len = 0; |
356 | 356 | ||
357 | gadget->ep0->driver_data = gadget; | 357 | gadget->ep0->driver_data = gadget; |
358 | 358 | ||
@@ -371,10 +371,9 @@ static int dbgp_setup(struct usb_gadget *gadget, | |||
371 | default: | 371 | default: |
372 | goto fail; | 372 | goto fail; |
373 | } | 373 | } |
374 | err = 0; | ||
374 | } else if (request == USB_REQ_SET_FEATURE && | 375 | } else if (request == USB_REQ_SET_FEATURE && |
375 | value == USB_DEVICE_DEBUG_MODE) { | 376 | value == USB_DEVICE_DEBUG_MODE) { |
376 | len = 0; | ||
377 | data = NULL; | ||
378 | dev_dbg(&dbgp.gadget->dev, "setup: feat debug\n"); | 377 | dev_dbg(&dbgp.gadget->dev, "setup: feat debug\n"); |
379 | #ifdef CONFIG_USB_G_DBGP_PRINTK | 378 | #ifdef CONFIG_USB_G_DBGP_PRINTK |
380 | err = dbgp_enable_ep(); | 379 | err = dbgp_enable_ep(); |