diff options
author | Jean Delvare <khali@linux-fr.org> | 2011-12-13 10:45:55 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-21 12:57:41 -0800 |
commit | ccd5790e5f7fdc113f50a3d10c97446243d7e2fb (patch) | |
tree | c6415b4a34ff17c704cd959ce7720bf4eab28ea2 | |
parent | 70f2545d9e75f9d8ed4bfe0a6efa232abd88806e (diff) |
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 <khali@linux-fr.org>
Cc: Durgadoss R <durgadoss.r@intel.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/hwmon/coretemp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 835ae427d85..6163cfa95c3 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); |