projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bef3c79
)
hwmon: (gpd-fan) Fix range check for pwm input
author
Cryolitia PukNgae
<cryolitia@uniontech.com>
Fri, 19 Sep 2025 08:38:49 +0000
(16:38 +0800)
committer
Guenter Roeck
<linux@roeck-us.net>
Wed, 24 Sep 2025 14:38:33 +0000
(07:38 -0700)
Fixed the maximum value in the PWM input range check, allowing the
input to be set to 255.
Fixes:
0ab88e239439
("hwmon: add GPD devices sensor driver")
Reported-by: Chenx Dust <chenx_dust@outlook.com>
Link:
https://github.com/Cryolitia/gpd-fan-driver/pull/18
Co-developed-by: Chenx Dust <chenx_dust@outlook.com>
Signed-off-by: Chenx Dust <chenx_dust@outlook.com>
Signed-off-by: Cryolitia PukNgae <cryolitia@uniontech.com>
Link:
https://lore.kernel.org/r/20250919-hwmon-v1-1-2b69c8b9c062@uniontech.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/gpd-fan.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/gpd-fan.c
b/drivers/hwmon/gpd-fan.c
index
e0b3b46
..
644dc3c
100644
(file)
--- a/
drivers/hwmon/gpd-fan.c
+++ b/
drivers/hwmon/gpd-fan.c
@@
-571,7
+571,7
@@
static int gpd_fan_hwmon_write(__always_unused struct device *dev,
ret = 0;
goto OUT;
case hwmon_pwm_input:
- if (!in_range(val, 0, 25
5
)) {
+ if (!in_range(val, 0, 25
6
)) {
ret = -ERANGE;
goto OUT;
}