Skip to contentSkip to conversation

hwmon: (coretemp) Fix oops on CPU offlining

PATCH In review Jean Delvare 2 participants 2 messages Dec 10, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: (coretemp) Fix oops on CPU offlining

From: Jean Delvare <[email protected]>
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.

---
Once again only kernel branch 3.0 is affected.

 drivers/hwmon/coretemp.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/hwmon/coretemp.c +2 -0
@@ -747,6 +747,8 @@ static void __cpuinit put_core_offline(u
 		return;
 
 	pdata = platform_get_drvdata(pdev);
+	if (!pdata)
+		return;
 
 	indx = TO_ATTR_NO(cpu);
 
Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Jean Delvare

From: Jean Delvare <[email protected]>
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.

Quoted 21 lines

---
Once again only kernel branch 3.0 is affected.

 drivers/hwmon/coretemp.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/hwmon/coretemp.c +2 -0
@@ -747,6 +747,8 @@ static void __cpuinit put_core_offline(u
 		return;
 
 	pdata = platform_get_drvdata(pdev);
+	if (!pdata)
+		return;
 
 	indx = TO_ATTR_NO(cpu);
 
Signature · 2 lines
-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors