diff options
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/composite.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 9885b4e57fd..cc21c20a34b 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -1271,12 +1271,11 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) case USB_REQ_GET_CONFIGURATION: if (ctrl->bRequestType != USB_DIR_IN) goto unknown; - if (cdev->config) { + if (cdev->config) *(u8 *)req->buf = cdev->config->bConfigurationValue; - value = min(w_length, (u16) 1); - } else { + else *(u8 *)req->buf = 0; - } + value = min(w_length, (u16) 1); break; /* function drivers must handle get/set altsetting; if there's |