]> git.karo-electronics.de Git - karo-tx-linux.git/commit
intel_idle: Check cpu_idle_get_driver() for NULL before dereferencing it.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 16 Aug 2012 20:06:55 +0000 (22:06 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Thu, 16 Aug 2012 20:06:55 +0000 (22:06 +0200)
commit19bf3f164ecb82c20491f7f8d5e0a33156117d5a
treef9d6b6b695f00de91846e3d63b65b03c32fe0b96
parent1b2e203ac4113c558c31afe4dc2a88a5cfeabeb7
intel_idle: Check cpu_idle_get_driver() for NULL before dereferencing it.

If the machine is booted without any cpu_idle driver set
(b/c disable_cpuidle() has been called) we should follow
other users of cpu_idle API and check the return value
for NULL before using it.

Reported-and-tested-by: Mark van Dijk <mark@internecto.net>
Suggested-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/idle/intel_idle.c