Commit a94247e7 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds

x86: convert cpu notifier to return encapsulate errno value

By the previous modification, the cpu notifier can return encapsulate
errno value.  This converts the cpu notifiers for msr, cpuid, and
therm_throt.
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b957e043
...@@ -190,7 +190,7 @@ thermal_throttle_cpu_callback(struct notifier_block *nfb, ...@@ -190,7 +190,7 @@ thermal_throttle_cpu_callback(struct notifier_block *nfb,
mutex_unlock(&therm_cpu_lock); mutex_unlock(&therm_cpu_lock);
break; break;
} }
return err ? NOTIFY_BAD : NOTIFY_OK; return notifier_from_errno(err);
} }
static struct notifier_block thermal_throttle_cpu_notifier __cpuinitdata = static struct notifier_block thermal_throttle_cpu_notifier __cpuinitdata =
......
...@@ -170,7 +170,7 @@ static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb, ...@@ -170,7 +170,7 @@ static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb,
cpuid_device_destroy(cpu); cpuid_device_destroy(cpu);
break; break;
} }
return err ? NOTIFY_BAD : NOTIFY_OK; return notifier_from_errno(err);
} }
static struct notifier_block __refdata cpuid_class_cpu_notifier = static struct notifier_block __refdata cpuid_class_cpu_notifier =
......
...@@ -230,7 +230,7 @@ static int __cpuinit msr_class_cpu_callback(struct notifier_block *nfb, ...@@ -230,7 +230,7 @@ static int __cpuinit msr_class_cpu_callback(struct notifier_block *nfb,
msr_device_destroy(cpu); msr_device_destroy(cpu);
break; break;
} }
return err ? NOTIFY_BAD : NOTIFY_OK; return notifier_from_errno(err);
} }
static struct notifier_block __refdata msr_class_cpu_notifier = { static struct notifier_block __refdata msr_class_cpu_notifier = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment