From ccd5790e5f7fdc113f50a3d10c97446243d7e2fb Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Tue, 13 Dec 2011 10:45:55 +0100 Subject: hwmon: (coretemp) Fix oops on CPU offlining This is for stable kernel branch 3.0 only. Previous and later versions have different code paths and are not affected by this bug. 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 Cc: Durgadoss R Acked-by: Guenter Roeck Cc: Fenghua Yu Signed-off-by: Greg Kroah-Hartman --- drivers/hwmon/coretemp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 835ae427d851..6163cfa95c3e 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -747,6 +747,8 @@ static void __cpuinit put_core_offline(unsigned int cpu) return; pdata = platform_get_drvdata(pdev); + if (!pdata) + return; indx = TO_ATTR_NO(cpu); -- cgit v1.2.3