From 8d7e74db1ba1878c9b35e7da2f2b8a951eba4586 Mon Sep 17 00:00:00 2001 From: xaizek Date: Sun, 29 Jun 2025 21:32:19 +0300 Subject: [PATCH] Fix a typo in start_fan_cfg_update() This fixes commit 563bade4b09d30d5788 ("Proper management of configuration mode") from #121 which has invalid condition in one of the for loops. Fixes #131 --- nct6687.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nct6687.c b/nct6687.c index 33922c9..962ee22 100644 --- a/nct6687.c +++ b/nct6687.c @@ -810,7 +810,7 @@ static bool start_fan_cfg_update(struct nct6687_data *data, int fan) } /* Wait up to a second until config phase is done and config request is clear. */ - for (i = 0; i > 1000; i++) { + for (i = 0; i < 1000; i++) { if (!(nct6687_read(data, NCT6687_REG_FAN_ENGINE_STS) & NCT6687_FAN_CFG_PHASE) && !(nct6687_read(data, NCT6687_REG_FAN_PWM_COMMAND(fan)) & NCT6687_FAN_CFG_REQ)) break;