diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-10 17:15:29 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-10 17:15:29 -0400 |
commit | 1a7b0ecbbc1219895f48934ff5549a3594db3480 (patch) | |
tree | 7e8afb77cb6e508f9fcaaefa92518c2dc1329d76 | |
parent | 416fd1ae87c2b8e40f2f39dc4bbe1a3d4d4391cd (diff) | |
parent | 3b9c10e98021e1f92e6f8c7ce1778b86ba68db10 (diff) |
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) | |||
331 | spin_lock(&cpuidle_driver_lock); | 331 | spin_lock(&cpuidle_driver_lock); |
332 | 332 | ||
333 | drv = cpuidle_get_driver(); | 333 | drv = cpuidle_get_driver(); |
334 | drv->refcnt++; | 334 | if (drv) |
335 | drv->refcnt++; | ||
335 | 336 | ||
336 | spin_unlock(&cpuidle_driver_lock); | 337 | spin_unlock(&cpuidle_driver_lock); |
337 | return drv; | 338 | return drv; |