mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-25 05:00:48 -04:00
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: d0ddfd241e ("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>
This commit is contained in:
committed by
Guenter Roeck
parent
af01dab0c3
commit
e741d13cc2
@@ -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]),
|
||||
|
||||
Reference in New Issue
Block a user