diff mbox

HID: i2c-hid: fix "incomplete report" noise

Message ID trinity-c9aeaeb6-3975-4c7c-bf9e-d80ecca62b53-1525201425575@3c-app-gmx-bs73 (mailing list archive)
State New, archived
Headers show

Commit Message

John Smith May 1, 2018, 7:03 p.m. UTC
Please undo the recent change on i2c-hid.c

> - if (ret_size > size) {
> + if ((ret_size > size) || (ret_size <= 2)) {
> dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n",
> __func__, size, ret_size);
> return;

This change spams in the dmesg output. Or remove the "=".

- if ((ret_size > size) || (ret_size <= 2)) {
+ if ((ret_size > size) || (ret_size < 2)) {


$ dmesg

[ 1781.266353] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2)
[ 1781.273898] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2)
[ 1781.281464] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2)
[ 1781.289064] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2)
[ 1781.296607] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2)
[ 1781.304131] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2)
[ 1781.311751] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2)
[ 1781.319315] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2)
[ 1781.326882] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2)
diff mbox

Patch

diff -uNr drivers/hid/i2c-hid/i2c-hid.c drivers/hid/i2c-hid/i2c-hid.c
--- drivers/hid/i2c-hid/i2c-hid.c	2018-04-26 11:00:39.000000000 +0200
+++ drivers/hid/i2c-hid/i2c-hid.c	2018-04-29 12:42:53.867780866 +0200
@@ -484,7 +484,7 @@ 
 		return;
 	}
 
-	if ((ret_size > size) || (ret_size <= 2)) {
+	if ((ret_size > size) || (ret_size < 2)) {
 		dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n",
 			__func__, size, ret_size);
 		return;