Merge branch 'pm-cpuidle'

* pm-cpuidle:
  cpuidle: Check the result of cpuidle_get_driver() against NULL
This commit is contained in:
Rafael J. Wysocki 2013-09-10 23:15:29 +02:00
commit 1a7b0ecbbc

View File

@ -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;