HID: ft260: fix an error message in ft260_i2c_write_read()
Subsystems (4)
PATCH 1/1 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 <[email protected]>
--- drivers/hid/hid-ft260.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/hid/hid-ft260.c +2 -1
@@ -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 ; }
Signature · 1 line
2.30.2
Quoted 13 lines · Dan Carpenter
The "len" variable is uninitialize.
Fixes 6a82582d9fa4 ("HID: ft260: add usb hid to i2c host bridge driver")Signed-off-by Dan Carpenter <[email protected]>--- drivers/hid/hid-ft260.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/hid/hid-ft260.c +0
-0
drivers/hid/hid-ft260.c static int ft260_i2c_write_read(struct ft260_device *dev, struct i2c_msg *msgs) · line 518
Quoted 8 lines
drivers/hid/hid-ft260.c +2
-1@@ -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 ; }
Applied, thanks Dan.
Signature · 2 lines
Jiri Kosina SUSE Labs
Michael Zaidman
maintainerQuoted 17 lines · Jiri Kosina
Quoted 15 lines · Dan Carpenter
The "len" variable is uninitialize.
Fixes 6a82582d9fa4 ("HID: ft260: add usb hid to i2c host bridge driver")Signed-off-by Dan Carpenter <[email protected]>--- drivers/hid/hid-ft260.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/hid/hid-ft260.c +0
-0@@ -512,7 +512,8 @@ static int ft260_i2c_write_read(struct ft260_device *dev, struct i2c_msg *msgs)struct hid_device *hdev = dev->hdev;
Quoted 6 lines
drivers/hid/hid-ft260.c static int ft260_i2c_write_read(struct ft260_device *dev, struct i2c_msg *msgs) · line 518
Quoted 6 lines
drivers/hid/hid-ft260.c +2
-1if (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 ; }
Dan, thanks for that quick fix.
Quoted 3 lines
Applied, thanks Dan.
Signature · 1 line
Jiri Kosina
Jiri, thank you for applying it.