From: David Sterba Date: Mon, 27 Dec 2010 15:27:43 +0000 (+0100) Subject: HID: picolcd: fix misuse of logical operation in place of bitop X-Git-Tag: firefly_0821_release~7613^2~3088^2~7^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=86280a208825d55ba988420b6b0ed2d6b9ec80f8;p=firefly-linux-kernel-4.4.55.git HID: picolcd: fix misuse of logical operation in place of bitop CC: Bruno Prémont CC: Jiri Kosina Signed-off-by: David Sterba Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-picolcd.c b/drivers/hid/hid-picolcd.c index bc2e07740628..0aff3cdddd83 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;