cpuidle: Check the result of cpuidle_get_driver() against NULL
authorDaniel Fu <danifu@nvidia.com>
Fri, 30 Aug 2013 11:48:22 +0000 (19:48 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 30 Aug 2013 19:53:41 +0000 (21:53 +0200)
If the current CPU has no cpuidle driver, drv will be NULL in
cpuidle_driver_ref().  Check if that is the case before trying
to bump up the driver's refcount to prevent the kernel from
crashing.

[rjw: Subject and changelog]
Signed-off-by: Daniel Fu <danifu@nvidia.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

No differences found