mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 04:56:13 +02:00
Merge branch 'pm-cpuidle'
* pm-cpuidle: cpuidle: Check the result of cpuidle_get_driver() against NULL
This commit is contained in:
commit
1a7b0ecbbc
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user