]> www.infradead.org Git - users/jedix/linux-maple.git/commit
intel_idle: Fix dangling registration on error path.
authorRichard Cochran <rcochran@linutronix.de>
Wed, 6 Apr 2016 21:00:52 +0000 (17:00 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 3 Nov 2016 17:25:38 +0000 (10:25 -0700)
commitbf8d9ab904b77361850fcaf380efa0baf91e555d
tree889aefbed730940a9dad11a0e1571201d826f4b2
parent7bf662673264102ebbfc2648677b89a2fa0f759b
intel_idle: Fix dangling registration on error path.

Orabug: 24810432

In the module_init() method, if the per-CPU allocation fails, then the
active cpuidle registration is not cleaned up.  This patch fixes the
issue by attempting the allocation before registration, and then
cleaning it up again on registration failure.

Signed-off-by: Richard Cochran <rcochran@linutronix.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit e9df69ccd1322e87eee10f28036fad9e6c71f8dd)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/idle/intel_idle.c