[lm-sensors] [PATCH] hwmon: (coretemp) Fix oops on CPU offlining

Jean Delvare khali at linux-fr.org
Sat Dec 10 21:41:15 CET 2011

From: Jean Delvare <khali at linux-fr.org>
Subject: hwmon: (coretemp) Fix oops on CPU offlining

This is the same fix as "hwmon: (coretemp) Fix oops on driver load"
but for the CPU offlining case. Sorry for missing it at first.
Signed-off-by: Jean Delvare <khali at linux-fr.org>
Cc: Durgadoss R <durgadoss.r at intel.com>
Cc: Guenter Roeck <guenter.roeck at ericsson.com>
Cc: Fenghua Yu <fenghua.yu at intel.com>
Cc: stable at kernel.org
Once again only kernel branch 3.0 is affected.

 drivers/hwmon/coretemp.c |    2 ++
 1 file changed, 2 insertions(+)

--- linux-3.0.orig/drivers/hwmon/coretemp.c	2011-12-10 14:05:08.000000000 +0100
+++ linux-3.0/drivers/hwmon/coretemp.c	2011-12-10 16:26:59.000000000 +0100
@@ -747,6 +747,8 @@ static void __cpuinit put_core_offline(u
 	pdata = platform_get_drvdata(pdev);
+	if (!pdata)
+		return;
 	indx = TO_ATTR_NO(cpu);

Jean Delvare

More information about the lm-sensors mailing list