[PATCH 05/13] HID: ft260: i2c: silence sysfs store big-numbers

From: Michael Zaidman

Date: Sat Aug 22 2026 - 17:41:16 EST


FT260_ATTR_STORE returned the feature-report transfer length from
ft260_hid_feature_report_set() instead of the sysfs write size. For
values like 1000, userspace writes more bytes than the HID report
length, so the VFS retries the remainder and reports "Invalid argument"
even though the attribute was applied correctly:

$ echo 1000 > .../clock
bash: line 1: echo: write error: Invalid argument
$ cat .../clock
1000

Return count after a successful parse so the full write is consumed.

Signed-off-by: Michael Zaidman <michael.zaidman@xxxxxxxxx>
---
drivers/hid/hid-ft260.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/hid/hid-ft260.c b/drivers/hid/hid-ft260.c
index 4435a39fce23..8db896f164cd 100644
--- a/drivers/hid/hid-ft260.c
+++ b/drivers/hid/hid-ft260.c
@@ -1479,6 +1479,7 @@ static void ft260_attr_dummy_func(struct hid_device *hdev, u8 req, u16 value)
hid_err(hdev, "%s: failed!\n", __func__); \
else \
func(hdev, req, name); \
+ ret = count; \
mutex_unlock(&dev->lock); \
} else { \
ret = -EINVAL; \
--
2.43.0