[PATCH 7/9] HID: intel-thc-hid: Drop redundant report ID validation in quicki2c
From: Dmitry Torokhov
Date: Mon Oct 12 2026 - 23:44:13 EST
Now that the core HID request handling validates returned report IDs
for report retrieval requests centrally, the report ID check in the
Intel QuickI2C driver is redundant. Drop it while retaining packet
length validation.
Assisted-by: LLM
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
---
drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c
index 41271301215a..7a362a2ebe2b 100644
--- a/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c
+++ b/drivers/hid/intel-thc-hid/intel-quicki2c/quicki2c-protocol.c
@@ -160,9 +160,9 @@ int quicki2c_get_report(struct quicki2c_device *qcdev, u8 report_type,
return ret;
}
- if (HIDI2C_DATA_LEN(le16_to_cpu(rpt->len)) != buf_len || rpt->data[0] != reportnum) {
- dev_err_once(qcdev->dev, "Invalid packet, len (%d vs %zu) report id (%d vs %d)\n",
- le16_to_cpu(rpt->len), buf_len, rpt->data[0], reportnum);
+ if (HIDI2C_DATA_LEN(le16_to_cpu(rpt->len)) != buf_len) {
+ dev_err_once(qcdev->dev, "Invalid packet length (%d vs %zu)\n",
+ le16_to_cpu(rpt->len), buf_len);
return -EINVAL;
}
--
2.56.0.385.gd3acb90ef8-goog