linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: ft260: fix an error message in ft260_i2c_write_read()
@ 2021-03-18 10:39 Dan Carpenter
  2021-03-19 13:26 ` Jiri Kosina
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2021-03-18 10:39 UTC (permalink / raw)
  To: Michael Zaidman
  Cc: Jiri Kosina, Benjamin Tissoires, linux-i2c, linux-input,
	linux-kernel, kernel-janitors

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>
---
 drivers/hid/hid-ft260.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;
 	}
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-19 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 10:39 [PATCH] HID: ft260: fix an error message in ft260_i2c_write_read() Dan Carpenter
2021-03-19 13:26 ` Jiri Kosina
2021-03-19 16:56   ` Michael Zaidman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).