request, requesttype, value, index, size);
dev->status = USB_ST_NOT_PROC; /*not yet processed */
- submit_control_msg(dev, pipe, data, size, setup_packet);
+ if (submit_control_msg(dev, pipe, data, size, setup_packet) < 0)
+ return -1;
if (timeout == 0)
return (int)size;
if (len < 0)
return -1;
dev->status = USB_ST_NOT_PROC; /*not yet processed */
- submit_bulk_msg(dev, pipe, data, len);
+ if (submit_bulk_msg(dev, pipe, data, len) < 0)
+ return -1;
while (timeout--) {
if (!((volatile unsigned long)dev->status & USB_ST_NOT_PROC))
break;