summaryrefslogtreecommitdiff
path: root/include/linux/energy_model.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/energy_model.h')
-rw-r--r--include/linux/energy_model.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/energy_model.h b/include/linux/energy_model.h
index 9618c0a46ef4..757fc60658fa 100644
--- a/include/linux/energy_model.h
+++ b/include/linux/energy_model.h
@@ -106,6 +106,9 @@ static inline unsigned long em_cpu_energy(struct em_perf_domain *pd,
struct em_perf_state *ps;
int i, cpu;
+ if (!sum_util)
+ return 0;
+
/*
* In order to predict the performance state, map the utilization of
* the most utilized CPU of the performance domain to a requested