The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] hwmon: (asus-ec-sensors) fix looping over banks while reading from EC
@ 2026-07-11  7:42 Eugene Shalygin
  0 siblings, 0 replies; only message in thread
From: Eugene Shalygin @ 2026-07-11  7:42 UTC (permalink / raw)
  To: eugene.shalygin
  Cc: Guenter Roeck, open list:ASUS EC HARDWARE MONITOR DRIVER,
	open list

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>
---
 drivers/hwmon/asus-ec-sensors.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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]),
-- 
2.55.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-11  7:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-11  7:42 [PATCH] hwmon: (asus-ec-sensors) fix looping over banks while reading from EC Eugene Shalygin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox