projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
powercap: DTPM: Check for Energy Model type
[platform/kernel/linux-starfive.git]
/
drivers
/
powercap
/
dtpm_cpu.c
diff --git
a/drivers/powercap/dtpm_cpu.c
b/drivers/powercap/dtpm_cpu.c
index
bca2f91
..
f5eced0
100644
(file)
--- a/
drivers/powercap/dtpm_cpu.c
+++ b/
drivers/powercap/dtpm_cpu.c
@@
-211,7
+211,7
@@
static int __dtpm_cpu_setup(int cpu, struct dtpm *parent)
return 0;
pd = em_cpu_get(cpu);
- if (!pd)
+ if (!pd
|| em_is_artificial(pd)
)
return -EINVAL;
dtpm_cpu = kzalloc(sizeof(*dtpm_cpu), GFP_KERNEL);