diff options
author | 2013-09-10 23:15:29 +0200 | |
---|---|---|
committer | 2013-09-10 23:15:29 +0200 | |
commit | 1a7b0ecbbc1219895f48934ff5549a3594db3480 (patch) | |
tree | 7e8afb77cb6e508f9fcaaefa92518c2dc1329d76 | |
parent | Merge branch 'acpi-assorted' (diff) | |
parent | cpuidle: Check the result of cpuidle_get_driver() against NULL (diff) | |
download | wireguard-linux-1a7b0ecbbc1219895f48934ff5549a3594db3480.tar.xz wireguard-linux-1a7b0ecbbc1219895f48934ff5549a3594db3480.zip |
Merge branch 'pm-cpuidle'
* pm-cpuidle:
cpuidle: Check the result of cpuidle_get_driver() against NULL
-rw-r--r-- | drivers/cpuidle/driver.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c index 3ac499d5a207..6e11701f0fca 100644 --- a/drivers/cpuidle/driver.c +++ b/drivers/cpuidle/driver.c @@ -331,7 +331,8 @@ struct cpuidle_driver *cpuidle_driver_ref(void) spin_lock(&cpuidle_driver_lock); drv = cpuidle_get_driver(); - drv->refcnt++; + if (drv) + drv->refcnt++; spin_unlock(&cpuidle_driver_lock); return drv; |