hwmon: (asus-ec-sensors) fix looping over banks while reading from EC
Subsystems (2)
Eugene Shalygin
maintainerPATCH 1/1 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 <[email protected]>
--- drivers/hwmon/asus-ec-sensors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/asus-ec-sensors.c +1 -1
@@ -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]),
Signature · 1 line
2.55.0
[email protected]
AI reviewSashiko has reviewed this patch and found no issues. It looks great!
Quoted 5 lines
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 <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 5 lines · Eugene Shalygin
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 <[email protected]>
Applied.
Thanks,
Guenter