]> git.baikalelectronics.ru Git - kernel.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)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 7 Apr 2016 20:10:56 +0000 (22:10 +0200)
commitabeea265f366aa69a81c6833e8bb6906b96b28f6
tree0f51f52ff6d92a502dddb07814cdf19547030263
parent8d3aa89497cc2dca9c42780a4361d128791093fe
intel_idle: Fix dangling registration on error path.

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>
drivers/idle/intel_idle.c