projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
cpuidle/coupled: Add sanity check for safe_state_index
[cascardo/linux.git]
/
drivers
/
cpuidle
/
driver.c
diff --git
a/drivers/cpuidle/driver.c
b/drivers/cpuidle/driver.c
index
5db1478
..
389ade4
100644
(file)
--- a/
drivers/cpuidle/driver.c
+++ b/
drivers/cpuidle/driver.c
@@
-227,6
+227,10
@@
static int __cpuidle_register_driver(struct cpuidle_driver *drv)
if (!drv || !drv->state_count)
return -EINVAL;
+ ret = cpuidle_coupled_state_verify(drv);
+ if (ret)
+ return ret;
+
if (cpuidle_disabled())
return -ENODEV;