diff --git a/src/target/target.c b/src/target/target.c index 5e2fe8cda..5867149a7 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -3050,10 +3050,8 @@ static int handle_target(void *priv) * allow some slack in the time comparison. Otherwise, if we * schedule for now+polling_interval, the next poll won't * actually happen until a polling_interval later. */ - if (!target->tap->enabled || - power_dropout || - srst_asserted || - timeval_ms() + polling_interval / 2 < target->backoff.next_attempt) + const bool poll_needed = timeval_ms() + polling_interval / 2 >= target->backoff.next_attempt; + if (!target->tap->enabled || power_dropout || srst_asserted || !poll_needed) continue; /* polling may fail silently until the target has been examined */