Merge "usb: composite: Return status zero if remote wakeup is not supported"

This commit is contained in:
qctecmdr 2021-02-11 00:42:57 -08:00 • committed by Gerrit - the friendly Code Review server
commit 52c083f29f

View file

@ -1899,7 +1899,11 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
f = cdev->config->interface[intf];
if (!f)
break;
status = f->get_status ? f->get_status(f) : 0;
if (USB_CONFIG_ATT_WAKEUP & cdev->config->bmAttributes)
status = f->get_status ? f->get_status(f) : 0;
else
status = 0;
if (status < 0)
break;
put_unaligned_le16(status & 0x0000ffff, req->buf);