]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
intel_idle: Propagate hot plug errors.
authorRichard Cochran <rcochran@linutronix.de>
Wed, 6 Apr 2016 21:00:56 +0000 (17:00 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 3 Nov 2016 17:25:54 +0000 (10:25 -0700)
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 <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 08820546e4c30c84d0a1f1a49df055e1719c07ea)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/idle/intel_idle.c

index 4418cfa2a4fc61e6a9acb14b787a2005c14f599e..8420ba10a4348deaf006f4101aef6288b3b96fbe 100644 (file)
@@ -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;
        }