diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/therm_throt.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c index 494d320d909b..24885be5c48c 100644 --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c | |||
@@ -131,17 +131,19 @@ static __cpuinit int thermal_throttle_cpu_callback(struct notifier_block *nfb, | |||
131 | { | 131 | { |
132 | unsigned int cpu = (unsigned long)hcpu; | 132 | unsigned int cpu = (unsigned long)hcpu; |
133 | struct sys_device *sys_dev; | 133 | struct sys_device *sys_dev; |
134 | int err; | 134 | int err = 0; |
135 | 135 | ||
136 | sys_dev = get_cpu_sysdev(cpu); | 136 | sys_dev = get_cpu_sysdev(cpu); |
137 | switch (action) { | 137 | switch (action) { |
138 | case CPU_ONLINE: | 138 | case CPU_UP_PREPARE: |
139 | case CPU_ONLINE_FROZEN: | 139 | case CPU_UP_PREPARE_FROZEN: |
140 | mutex_lock(&therm_cpu_lock); | 140 | mutex_lock(&therm_cpu_lock); |
141 | err = thermal_throttle_add_dev(sys_dev); | 141 | err = thermal_throttle_add_dev(sys_dev); |
142 | mutex_unlock(&therm_cpu_lock); | 142 | mutex_unlock(&therm_cpu_lock); |
143 | WARN_ON(err); | 143 | WARN_ON(err); |
144 | break; | 144 | break; |
145 | case CPU_UP_CANCELED: | ||
146 | case CPU_UP_CANCELED_FROZEN: | ||
145 | case CPU_DEAD: | 147 | case CPU_DEAD: |
146 | case CPU_DEAD_FROZEN: | 148 | case CPU_DEAD_FROZEN: |
147 | mutex_lock(&therm_cpu_lock); | 149 | mutex_lock(&therm_cpu_lock); |
@@ -149,7 +151,7 @@ static __cpuinit int thermal_throttle_cpu_callback(struct notifier_block *nfb, | |||
149 | mutex_unlock(&therm_cpu_lock); | 151 | mutex_unlock(&therm_cpu_lock); |
150 | break; | 152 | break; |
151 | } | 153 | } |
152 | return NOTIFY_OK; | 154 | return err ? NOTIFY_BAD : NOTIFY_OK; |
153 | } | 155 | } |
154 | 156 | ||
155 | static struct notifier_block thermal_throttle_cpu_notifier __cpuinitdata = | 157 | static struct notifier_block thermal_throttle_cpu_notifier __cpuinitdata = |