Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10911
b: refs/heads/master
c: 018a2cd
h: refs/heads/master
i:
  10909: 02883e8
  10907: 9e953f7
  10903: e358588
  10895: ec52b6a
  10879: 4cb1ebc
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Oct 29, 2005
1 parent 4c65ac8 commit c45cc92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 32b32c2c3566b206988fa30336ec6534759823b5
refs/heads/master: 018a2cdf1e633497bb4f01eb86a7cbffa611776d
16 changes: 2 additions & 14 deletions trunk/drivers/usb/misc/idmouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,20 +319,8 @@ static ssize_t idmouse_read(struct file *file, char __user *buffer, size_t count
return -ENODEV;
}

if (*ppos >= IMGSIZE) {
up (&dev->sem);
return 0;
}

count = min ((loff_t)count, IMGSIZE - (*ppos));

if (copy_to_user (buffer, dev->bulk_in_buffer + *ppos, count)) {
result = -EFAULT;
} else {
result = count;
*ppos += count;
}

result = simple_read_from_buffer(buffer, count, ppos,
dev->bulk_in_buffer, IMGSIZE);
/* unlock the device */
up(&dev->sem);
return result;
Expand Down

0 comments on commit c45cc92

Please sign in to comment.