|
@@ -146,7 +146,6 @@ int config_ep_by_speed(struct usb_gadget *g,
|
|
|
struct usb_function *f,
|
|
|
struct usb_ep *_ep)
|
|
|
{
|
|
|
- struct usb_composite_dev *cdev = get_gadget_data(g);
|
|
|
struct usb_endpoint_descriptor *chosen_desc = NULL;
|
|
|
struct usb_descriptor_header **speed_desc = NULL;
|
|
|
|
|
@@ -226,8 +225,12 @@ ep_found:
|
|
|
_ep->maxburst = comp_desc->bMaxBurst + 1;
|
|
|
break;
|
|
|
default:
|
|
|
- if (comp_desc->bMaxBurst != 0)
|
|
|
+ if (comp_desc->bMaxBurst != 0) {
|
|
|
+ struct usb_composite_dev *cdev;
|
|
|
+
|
|
|
+ cdev = get_gadget_data(g);
|
|
|
ERROR(cdev, "ep0 bMaxBurst must be 0\n");
|
|
|
+ }
|
|
|
_ep->maxburst = 1;
|
|
|
break;
|
|
|
}
|