summaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
authorGavin Shan <gshan@redhat.com>2020-06-30 17:59:43 +1000
committerWill Deacon <will@kernel.org>2020-07-08 21:41:24 +0100
commit132330f8044c8e0cfa83b5eee41ade52708390dc (patch)
tree1194758c65ab5021416d1f998a4f4f8f2e3439a6 /drivers/firmware
parentc377e67c6271954969384f9be1b1b71de13eba30 (diff)
downloadlinux-132330f8044c8e0cfa83b5eee41ade52708390dc.tar.bz2
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: Gavin Shan <gshan@redhat.com> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com> Link: https://lore.kernel.org/r/20200630075943.203954-1-gshan@redhat.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/psci/psci_checker.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/firmware/psci/psci_checker.c b/drivers/firmware/psci/psci_checker.c
index d9b1a2d71223..3d6ba425dbb9 100644
--- a/drivers/firmware/psci/psci_checker.c
+++ b/drivers/firmware/psci/psci_checker.c
@@ -199,13 +199,12 @@ static int hotplug_tests(void)
if (!page_buf)
goto out_free_cpu_groups;
- err = 0;
/*
* Of course the last CPU cannot be powered down and cpu_down() should
* refuse doing that.
*/
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