diff options
| author | 2026-07-11 09:42:07 +0200 | |
|---|---|---|
| committer | 2026-07-19 07:15:04 -0700 | |
| commit | e741d13cc2abfc6fccebe2008057aa52e285223e (patch) | |
| tree | fc4207f1512197955846377220f0b99d8b94178f | |
| parent | hwmon: (pmbus/max34440) block unsupported VIN and IIN limit registers (diff) | |
hwmon: (asus-ec-sensors) fix looping over banks while reading from EC
Do not assume there are only bank 0 and bank 1 available, just use '!='
for bank comparison.
Fixes: d0ddfd241e57 ("hwmon: (asus-ec-sensors) add driver for ASUS EC")
Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Link: https://lore.kernel.org/r/20260711074217.554656-1-eugene.shalygin@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| -rw-r--r-- | drivers/hwmon/asus-ec-sensors.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/asus-ec-sensors.c b/drivers/hwmon/asus-ec-sensors.c index 29a23484cbe7..4de6045d1b68 100644 --- a/drivers/hwmon/asus-ec-sensors.c +++ b/drivers/hwmon/asus-ec-sensors.c @@ -1189,7 +1189,7 @@ static int asus_ec_block_read(const struct device *dev, } for (ireg = 0; ireg < ec->nr_registers; ireg++) { reg_bank = register_bank(ec->registers[ireg]); - if (reg_bank < bank) { + if (reg_bank != bank) { continue; } ec_read(register_index(ec->registers[ireg]), |
