diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-01-08 01:08:19 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-01-08 01:08:19 +0100 |
commit | a7153258b70ccbe3922fcee9ca4271d4f4c2bc55 (patch) | |
tree | 12e17027af36846933908da64a1419491ea58676 /drivers/hid/hid-picolcd.c | |
parent | ae5e49c79c051ea1d5ca91cbd4a0d22189067ba3 (diff) | |
parent | 0fbf8ed976af5bb43cf9cf2492161eb9688fee0c (diff) | |
download | linux-3.10-a7153258b70ccbe3922fcee9ca4271d4f4c2bc55.tar.gz linux-3.10-a7153258b70ccbe3922fcee9ca4271d4f4c2bc55.tar.bz2 linux-3.10-a7153258b70ccbe3922fcee9ca4271d4f4c2bc55.zip |
Merge branches 'upstream' and 'upstream-fixes' into for-linus
Diffstat (limited to 'drivers/hid/hid-picolcd.c')
-rw-r--r-- | drivers/hid/hid-picolcd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/hid/hid-picolcd.c b/drivers/hid/hid-picolcd.c index ed0e066b7f0..de9cf21b349 100644 --- a/drivers/hid/hid-picolcd.c +++ b/drivers/hid/hid-picolcd.c @@ -1544,7 +1544,7 @@ static ssize_t picolcd_debug_eeprom_read(struct file *f, char __user *u, /* prepare buffer with info about what we want to read (addr & len) */ raw_data[0] = *off & 0xff; - raw_data[1] = (*off >> 8) && 0xff; + raw_data[1] = (*off >> 8) & 0xff; raw_data[2] = s < 20 ? s : 20; if (*off + raw_data[2] > 0xff) raw_data[2] = 0x100 - *off; @@ -1583,7 +1583,7 @@ 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[1] = (*off >> 8) & 0xff; raw_data[2] = s < 20 ? s : 20; if (*off + raw_data[2] > 0xff) raw_data[2] = 0x100 - *off; @@ -1867,6 +1867,7 @@ static void picolcd_debug_out_report(struct picolcd_data *data, report->id, raw_size); hid_debug_event(hdev, buff); if (raw_size + 5 > sizeof(raw_data)) { + kfree(buff); hid_debug_event(hdev, " TOO BIG\n"); return; } else { |