Skip to content

Commit 132330f

Browse files
Gavin Shanwilldeacon
authored andcommitted
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 <[email protected]> Reviewed-by: Sudeep Holla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent c377e67 commit 132330f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/firmware/psci/psci_checker.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,12 @@ static int hotplug_tests(void)
199199
if (!page_buf)
200200
goto out_free_cpu_groups;
201201

202-
err = 0;
203202
/*
204203
* Of course the last CPU cannot be powered down and cpu_down() should
205204
* refuse doing that.
206205
*/
207206
pr_info("Trying to turn off and on again all CPUs\n");
208-
err += down_and_up_cpus(cpu_online_mask, offlined_cpus);
207+
err = down_and_up_cpus(cpu_online_mask, offlined_cpus);
209208

210209
/*
211210
* Take down CPUs by cpu group this time. When the last CPU is turned

0 commit comments

Comments
 (0)