Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1366278

[PATCH 09/10] intel_idle: Propagate hot plug errors.

From Richard Cochran <rcochran@linutronix.de>
Newsgroups linux.kernel
Subject [PATCH 09/10] intel_idle: Propagate hot plug errors.
Date 2016-03-29 15:20 +0200
Message-ID <ri1IU-6LW-53@gated-at.bofh.it> (permalink)
References <ri1IS-6LW-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Cc: Len Brown <lenb@kernel.org>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Richard Cochran <rcochran@linutronix.de>
---
 drivers/idle/intel_idle.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 4418cfa..8420ba1 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;
 	}
-- 
2.1.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/10] intel_idle: Fix hot plug handling. Richard Cochran <rcochran@linutronix.de> - 2016-03-29 15:20 +0200
  [PATCH 09/10] intel_idle: Propagate hot plug errors. Richard Cochran <rcochran@linutronix.de> - 2016-03-29 15:20 +0200
  [PATCH 02/10] intel_idle: Fix a helper function's return value. Richard Cochran <rcochran@linutronix.de> - 2016-03-29 15:20 +0200
  [PATCH 01/10] intel_idle: remove useless return from void function. Richard Cochran <rcochran@linutronix.de> - 2016-03-29 15:20 +0200
  [PATCH 04/10] intel_idle: Fix deallocation order on the driver exit path. Richard Cochran <rcochran@linutronix.de> - 2016-03-29 15:20 +0200

csiph-web