mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
Revert "drivers: usb: gadget: handle NULL descriptors in composite config_buf"
This reverts commit f355c97f4c.
This commit is contained in:
@@ -236,7 +236,6 @@ static int config_buf(struct usb_configuration *config,
|
||||
int len = USB_BUFSIZ - USB_DT_CONFIG_SIZE;
|
||||
struct usb_function *f;
|
||||
int status;
|
||||
int interfaceCount = 0;
|
||||
|
||||
/* write the config descriptor */
|
||||
c = buf;
|
||||
@@ -267,16 +266,8 @@ static int config_buf(struct usb_configuration *config,
|
||||
descriptors = f->hs_descriptors;
|
||||
else
|
||||
descriptors = f->descriptors;
|
||||
if (!descriptors || descriptors[0] == NULL) {
|
||||
for (; f != config->interface[interfaceCount];) {
|
||||
interfaceCount++;
|
||||
c->bNumInterfaces--;
|
||||
}
|
||||
if (!descriptors)
|
||||
continue;
|
||||
}
|
||||
for (; f != config->interface[interfaceCount];)
|
||||
interfaceCount++;
|
||||
|
||||
status = usb_descriptor_fillbuf(next, len,
|
||||
(const struct usb_descriptor_header **) descriptors);
|
||||
if (status < 0)
|
||||
|
||||
Reference in New Issue
Block a user