author: Alexandre Belloni <alexandre.belloni@bootlin.com> 2020-07-11 01:08:12 +0200
committer: Daniel Lezcano <daniel.lezcano@linaro.org> 2020-07-11 18:58:18 +0200
commit: 501465d5d7af63af5942cf6af783952bdd757c52
parent: ef1d6a20e06397f4a28f23524cdb4611fd629063
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 4 deletions
diff --git a/drivers/clocksource/timer-atmel-tcb.c b/drivers/clocksource/timer-atmel-tcb.c
index 7a6474acc774..7fea134650fc 100644
--- a/drivers/clocksource/timer-atmel-tcb.c
+++ b/drivers/clocksource/timer-atmel-tcb.c
@@ -432,10 +432,8 @@ static int __init tcb_clksrc_init(struct device_node *node)
tmp = rate / divisor;
pr_debug("TC: %u / %-3u [%d] --> %u\n", rate, divisor, i, tmp);
- if (best_divisor_idx > 0) {
- if (tmp < 5 * 1000 * 1000)
- continue;
- }
+ if ((best_divisor_idx >= 0) && (tmp < 5 * 1000 * 1000))
+ break;
divided_rate = tmp;
best_divisor_idx = i;
}