diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-03-18 13:39:34 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2021-03-19 16:26:16 +0300 |
commit | 2076b7bdc5290141cea809c8462b769836bd2757 (patch) | |
tree | 99c714b0fd1edc8f1541ffc9ba035bef56354b61 /drivers/hid | |
parent | 6a82582d9fa438045191074856f47165334f2777 (diff) | |
download | linux-2076b7bdc5290141cea809c8462b769836bd2757.tar.xz |
HID: ft260: fix an error message in ft260_i2c_write_read()
The "len" variable is uninitialize.
Fixes: 6a82582d9fa4 ("HID: ft260: add usb hid to i2c host bridge driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-ft260.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/hid-ft260.c b/drivers/hid/hid-ft260.c index 047aa85a7c83..a5751607ce24 100644 --- a/drivers/hid/hid-ft260.c +++ b/drivers/hid/hid-ft260.c @@ -512,7 +512,8 @@ static int ft260_i2c_write_read(struct ft260_device *dev, struct i2c_msg *msgs) struct hid_device *hdev = dev->hdev; if (msgs[0].len > 2) { - hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, len); + hid_err(hdev, "%s: unsupported wr len: %d\n", __func__, + msgs[0].len); return -EOPNOTSUPP; } |