The radiation governor uses the history of CPU utilization
in order to decide the proper pass level. If CPU idle time
is over period time (default 400ms), there is no any history
of cpu utilization. If the number of history is zero,
the governor have to return with previous pass level.
So, this patch handle the error case if the number
of load entry is zero.
Change-Id: If32d334b21059a5c889c866a0e70f41181133ebd
Reported-by: Eunki Hong <eunkiki.hong@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
}
}
+ if (!num_pass_gov)
+ return level;
+
if (up_count * 100 >= num_pass_gov * up_threshold) {
level += policy->cpufreq.num_nr_cpus;