Skip to content

Commit 2076b7b

Browse files
Dan CarpenterJiri Kosina
authored andcommitted
HID: ft260: fix an error message in ft260_i2c_write_read()
The "len" variable is uninitialize. Fixes: 6a82582 ("HID: ft260: add usb hid to i2c host bridge driver") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 6a82582 commit 2076b7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/hid/hid-ft260.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,8 @@ static int ft260_i2c_write_read(struct ft260_device *dev, struct i2c_msg *msgs)
512512
struct hid_device *hdev = dev->hdev;
513513

514514
if (msgs[0].len > 2) {
515-
hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len);
515+
hid_err(hdev, "%s: unsupported wr len: %d\n", __func__,
516+
msgs[0].len);
516517
return -EOPNOTSUPP;
517518
}
518519

0 commit comments

Comments
 (0)