Skip to content

Commit

Permalink
intel_idle: Propagate hot plug errors.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Richard Cochran authored and rafaeljw committed Apr 7, 2016
1 parent b69ef2c commit 0882054
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/idle/intel_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0882054

Please sign in to comment.