[30/45] hwmon: (coretemp) Fix oops on CPU offlining
From: Greg KH
Date: Fri Dec 16 2011 - 14:54:10 EST
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
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 <khali@xxxxxxxxxxxx>
Cc: Durgadoss R <durgadoss.r@xxxxxxxxx>
Acked-by: Guenter Roeck <guenter.roeck@xxxxxxxxxxxx>
Cc: Fenghua Yu <fenghua.yu@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
drivers/hwmon/coretemp.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/