[PATCH 2/3] HID: hid-lenovo-go-s: Remove impossible condition

From: Ethan Tidmore

Date: Fri Feb 27 2026 - 15:56:12 EST


The variable val is of type u8, so it can only be 0-255.

Remove this condition.

Detected by Smatch:
drivers/hid/hid-lenovo-go-s.c:508 gamepad_property_store() warn:
impossible condition '(val > 255) => (0-255 > 255)'

Signed-off-by: Ethan Tidmore <ethantidmore06@xxxxxxxxx>
---
drivers/hid/hid-lenovo-go-s.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/hid/hid-lenovo-go-s.c b/drivers/hid/hid-lenovo-go-s.c
index 0ef98ba68d86..a24737170f83 100644
--- a/drivers/hid/hid-lenovo-go-s.c
+++ b/drivers/hid/hid-lenovo-go-s.c
@@ -504,9 +504,6 @@ static ssize_t gamepad_property_store(struct device *dev,
ret = kstrtou8(buf, 10, &val);
if (ret)
return ret;
-
- if (val < 0 || val > 255)
- return -EINVAL;
break;
case FEATURE_IMU_ENABLE:
ret = sysfs_match_string(feature_enabled_text, buf);
--
2.53.0