Commit e9a5f426 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Linus Torvalds
Browse files

CPU: Avoid using unititialized error variable in disable_nonboot_cpus()

If there's only one CPU online when disable_nonboot_cpus() is called,
the error variable will not be initialized and that may lead to
erroneous behavior.  Fix this issue by initializing error in
disable_nonboot_cpus() as appropriate.
Signed-off-by: default avatarRafael J. Wysocki <>
Signed-off-by: default avatarLinus Torvalds <>
parent 97ef6f74
......@@ -394,7 +394,7 @@ static cpumask_var_t frozen_cpus;
int disable_nonboot_cpus(void)
int cpu, first_cpu, error;
int cpu, first_cpu, error = 0;
first_cpu = cpumask_first(cpu_online_mask);
Supports Markdown
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