Commit 132330f8 authored by Gavin Shan's avatar Gavin Shan Committed by Will Deacon

drivers/firmware/psci: Assign @err directly in hotplug_tests()

The return value of down_and_up_cpus() can be assigned to @err directly.
With that, the useless assignment to @err with zero can be dropped.
Signed-off-by: default avatarGavin Shan <gshan@redhat.com>
Reviewed-by: default avatarSudeep Holla <sudeep.holla@arm.com>
Link: https://lore.kernel.org/r/20200630075943.203954-1-gshan@redhat.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
parent c377e67c
...@@ -199,13 +199,12 @@ static int hotplug_tests(void) ...@@ -199,13 +199,12 @@ static int hotplug_tests(void)
if (!page_buf) if (!page_buf)
goto out_free_cpu_groups; goto out_free_cpu_groups;
err = 0;
/* /*
* Of course the last CPU cannot be powered down and cpu_down() should * Of course the last CPU cannot be powered down and cpu_down() should
* refuse doing that. * refuse doing that.
*/ */
pr_info("Trying to turn off and on again all CPUs\n"); pr_info("Trying to turn off and on again all CPUs\n");
err += down_and_up_cpus(cpu_online_mask, offlined_cpus); err = down_and_up_cpus(cpu_online_mask, offlined_cpus);
/* /*
* Take down CPUs by cpu group this time. When the last CPU is turned * Take down CPUs by cpu group this time. When the last CPU is turned
......
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