Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248531
b: refs/heads/master
c: 8c4e708
h: refs/heads/master
i:
  248529: f78823d
  248527: be085f7
v: v3
  • Loading branch information
Bruno Prémont authored and Jiri Kosina committed May 5, 2011
1 parent 6a65b73 commit 90bd1f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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: 6d67c110ab204bc4c2f4f3e368b8d7cf1f38a4f8
refs/heads/master: 8c4e708d01424f88afde64a96ffd05146c9978b8
4 changes: 2 additions & 2 deletions trunk/drivers/hid/hid-picolcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1584,11 +1584,11 @@ static ssize_t picolcd_debug_eeprom_write(struct file *f, const char __user *u,
memset(raw_data, 0, sizeof(raw_data));
raw_data[0] = *off & 0xff;
raw_data[1] = (*off >> 8) & 0xff;
raw_data[2] = s < 20 ? s : 20;
raw_data[2] = min((size_t)20, s);
if (*off + raw_data[2] > 0xff)
raw_data[2] = 0x100 - *off;

if (copy_from_user(raw_data+3, u, raw_data[2]))
if (copy_from_user(raw_data+3, u, min((u8)20, raw_data[2])))
return -EFAULT;
resp = picolcd_send_and_wait(data->hdev, REPORT_EE_WRITE, raw_data,
sizeof(raw_data));
Expand Down

0 comments on commit 90bd1f1

Please sign in to comment.