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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jean Delvare <khali@xxxxxxxxxxxx>
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@xxxxxxxxxxxx>
Cc: Durgadoss R <durgadoss.r@xxxxxxxxx>
Cc: Guenter Roeck <guenter.roeck@xxxxxxxxxxxx>
Cc: Fenghua Yu <fenghua.yu@xxxxxxxxx>
Cc: stable@xxxxxxxxxx
---
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
 		return;
 
 	pdata = platform_get_drvdata(pdev);
+	if (!pdata)
+		return;
 
 	indx = TO_ATTR_NO(cpu);
 


-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux