summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/usb_storage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/usb_storage.c b/common/usb_storage.c
index a57570b73f..a91b1c0d2f 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -964,7 +964,7 @@ static void usb_stor_set_max_xfer_blk(struct usb_device *udev,
blk = 20;
} else {
if (size > USHRT_MAX * 512)
- blk = USHRT_MAX;
+ size = USHRT_MAX * 512;
blk = size / 512;
}
#endif