diff options
author | Richard Cochran <rcochran@linutronix.de> | 2016-04-06 17:00:56 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-04-07 22:11:02 +0200 |
commit | 08820546e4c30c84d0a1f1a49df055e1719c07ea (patch) | |
tree | dbecd82adb831a8f7936c90b415de47c0829df79 /drivers | |
parent | b69ef2c099c3e5f11bd5c33a9530d6522f72c9aa (diff) | |
download | linux-08820546e4c30c84d0a1f1a49df055e1719c07ea.tar.gz linux-08820546e4c30c84d0a1f1a49df055e1719c07ea.tar.bz2 linux-08820546e4c30c84d0a1f1a49df055e1719c07ea.zip |
intel_idle: Propagate hot plug errors.
If a cpuidle registration error occurs during the hot plug notifier
callback, we should really inform the hot plug machinery instead of
just ignoring the error. This patch changes the callback to properly
return on error.
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/idle/intel_idle.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 4418cfa2a4fc..8420ba10a434 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -818,8 +818,11 @@ static int cpu_hotplug_notify(struct notifier_block *n, * driver in this case */ dev = per_cpu_ptr(intel_idle_cpuidle_devices, hotcpu); - if (!dev->registered) - intel_idle_cpu_init(hotcpu); + if (dev->registered) + break; + + if (intel_idle_cpu_init(hotcpu)) + return NOTIFY_BAD; break; } |