aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_host.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb/musb_host.c')
-rw-r--r--drivers/usb/musb/musb_host.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 8b2473f..bbac21d 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -1663,7 +1663,7 @@ void musb_host_rx(struct musb *musb, u8 epnum)
d->status = d_status;
buf = urb->transfer_dma + d->offset;
} else {
- length = rx_count;
+ length = min(rx_count, urb->transfer_buffer_length);
buf = urb->transfer_dma +
urb->actual_length;
}