]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hwmon: (dell-smm) Fix off-by-one error in dell_smm_is_visible()
authorArmin Wolf <W_Armin@gmx.de>
Wed, 3 Dec 2025 20:21:09 +0000 (21:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:16:56 +0000 (10:16 +0100)
commit1e9cf600da98affcc652857a35ba637d13126bfc
tree711f7992122254c18a83b9912452daff5d6001cb
parentc341dee80b5df49a936182341b36395c831c2661
hwmon: (dell-smm) Fix off-by-one error in dell_smm_is_visible()

commit fae00a7186cecf90a57757a63b97a0cbcf384fe9 upstream.

The documentation states that on machines supporting only global
fan mode control, the pwmX_enable attributes should only be created
for the first fan channel (pwm1_enable, aka channel 0).

Fix the off-by-one error caused by the fact that fan channels have
a zero-based index.

Cc: stable@vger.kernel.org
Fixes: 1c1658058c99 ("hwmon: (dell-smm) Add support for automatic fan mode")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20251203202109.331528-1-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/dell-smm-hwmon.c