summaryrefslogtreecommitdiff
path: root/drivers/usb/usbip/usbip_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/usbip/usbip_common.c')
-rw-r--r--drivers/usb/usbip/usbip_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/usbip/usbip_common.c b/drivers/usb/usbip/usbip_common.c
index 6532d68e8808..e4b96674c405 100644
--- a/drivers/usb/usbip/usbip_common.c
+++ b/drivers/usb/usbip/usbip_common.c
@@ -727,6 +727,9 @@ int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb)
copy -= recv;
ret += recv;
+
+ if (!copy)
+ break;
}
if (ret != size)