From: Richard Cochran Date: Wed, 6 Apr 2016 21:00:56 +0000 (-0400) Subject: intel_idle: Propagate hot plug errors. X-Git-Tag: v4.1.12-92~46^2~9 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0b334207e6991fc46d049ce1df226218a2e734dc;p=users%2Fjedix%2Flinux-maple.git intel_idle: Propagate hot plug errors. Orabug: 24810432 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 Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki (cherry picked from commit 08820546e4c30c84d0a1f1a49df055e1719c07ea) Signed-off-by: Brian Maly --- 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; }