]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
hwmon: (coretemp) Fix oops on CPU offlining
authorJean Delvare <khali@linux-fr.org>
Tue, 13 Dec 2011 09:45:55 +0000 (10:45 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 21 Dec 2011 20:57:41 +0000 (12:57 -0800)
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>
drivers/hwmon/coretemp.c

index 835ae427d85193d5da9764f287f8a8a1070a0880..6163cfa95c3ebcb148ee3037925b977867ce8675 100644 (file)
@@ -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);