Krzysztof Mazur 392370e7aa cpuidle: fix number of initialized/destroyed states
Commit bf4d1b5ddb78f86078ac6ae0415802d5f0c68f92 (cpuidle: support
multiple drivers) changed the number of initialized state kobjects
in cpuidle_add_state_sysfs() from device->state_count to
drv->state_count, but left device->state_count in
cpuidle_remove_state_sysfs().  The values of these two fields may be
different, in which case a NULL pointer dereference may happen in
cpuidle_remove_state_sysfs(), for example.  Fix this problem by making
cpuidle_add_state_sysfs() use device->state_count too (which restores
the original behavior of it).

[rjw: Changelog]
Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-01-11 23:20:09 +01:00
..
2013-01-04 23:10:29 +01:00
2013-01-06 00:36:17 +01:00
2013-01-08 18:53:56 -08:00
2013-01-08 18:53:56 -08:00
2012-12-11 14:08:47 -08:00
2012-12-18 15:19:06 +10:30
2012-12-12 11:45:16 -08:00
2013-01-08 18:53:56 -08:00
2013-01-08 18:53:56 -08:00
2012-12-19 08:19:07 -08:00
2012-12-11 13:13:55 -08:00
2012-12-12 12:05:15 -08:00
2013-01-08 18:53:56 -08:00