diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-03-09 11:40:37 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-03-09 11:40:37 +0100 |
commit | 0bae2f17323a4630c487a9b77c37bebf407424af (patch) | |
tree | fc1f71a0209ec61841a5acb65d59d147af3cc4fa /drivers/cpufreq/cpufreq.c | |
parent | gpio: mpc8xxx: Slightly update the code for better readability (diff) | |
parent | gpio: tps65912: Add GPIO driver for the TPS65912 PMIC (diff) | |
download | linux-0bae2f17323a4630c487a9b77c37bebf407424af.tar.xz linux-0bae2f17323a4630c487a9b77c37bebf407424af.zip |
Merge branch 'ib-mfd-regulator-gpio-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into devel
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index c35e7da1ed7a..e979ec78b695 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -48,11 +48,11 @@ static struct cpufreq_policy *next_policy(struct cpufreq_policy *policy, bool active) { do { - policy = list_next_entry(policy, policy_list); - /* No more policies in the list */ - if (&policy->policy_list == &cpufreq_policy_list) + if (list_is_last(&policy->policy_list, &cpufreq_policy_list)) return NULL; + + policy = list_next_entry(policy, policy_list); } while (!suitable_policy(policy, active)); return policy; |