Skip to content

Commit 4480275

Browse files
committed
Merge branch 'pm-cpufreq' into linux-next
* pm-cpufreq: cpufreq: Avoid calling get_governor() for first policy
2 parents 83cb7d6 + c5746dc commit 4480275

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/cpufreq/cpufreq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,8 @@ static int cpufreq_init_policy(struct cpufreq_policy *policy)
11211121

11221122
if (has_target()) {
11231123
/* Update policy governor to the one used before hotplug. */
1124-
gov = get_governor(policy->last_governor);
1124+
if (policy->last_governor[0] != '\0')
1125+
gov = get_governor(policy->last_governor);
11251126
if (gov) {
11261127
pr_debug("Restoring governor %s for cpu %d\n",
11271128
gov->name, policy->cpu);

0 commit comments

Comments
 (0)