summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/usb-skeleton.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
index 719d23a..b6652ef 100644
--- a/drivers/usb/usb-skeleton.c
+++ b/drivers/usb/usb-skeleton.c
@@ -166,7 +166,7 @@ static ssize_t skel_write(struct file *file, const char *user_buffer, size_t cou
int retval = 0;
struct urb *urb = NULL;
char *buf = NULL;
- size_t writesize = max(count, MAX_TRANSFER);
+ size_t writesize = min(count, MAX_TRANSFER);
dev = (struct usb_skel *)file->private_data;
OpenPOWER on IntegriCloud