diff options
-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; |