diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-10 23:15:29 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-10 23:15:29 +0200 |
commit | 1a7b0ecbbc1219895f48934ff5549a3594db3480 (patch) | |
tree | 7e8afb77cb6e508f9fcaaefa92518c2dc1329d76 /drivers | |
parent | 416fd1ae87c2b8e40f2f39dc4bbe1a3d4d4391cd (diff) | |
parent | 3b9c10e98021e1f92e6f8c7ce1778b86ba68db10 (diff) |
Merge branch 'pm-cpuidle'
* pm-cpuidle:
cpuidle: Check the result of cpuidle_get_driver() against NULL
Diffstat (limited to 'drivers')
-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 3ac499d5a20..6e11701f0fc 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; |