[PATCH 35/36] cpupower: remove conditional return with no effect

From: Sang-Heon Jeon

Date: Thu Jul 23 2026 - 15:09:13 EST


Both branches of the check return the same value, so the check has
no effect. Remove it and return the value directly.

This is the result of running the Coccinelle script from
scripts/coccinelle/misc/cond_return_no_effect.cocci.

Signed-off-by: Sang-Heon Jeon <ekffu200098@xxxxxxxxx>
---
tools/power/cpupower/utils/powercap-info.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/tools/power/cpupower/utils/powercap-info.c b/tools/power/cpupower/utils/powercap-info.c
index e53033488218..88a5edb76315 100644
--- a/tools/power/cpupower/utils/powercap-info.c
+++ b/tools/power/cpupower/utils/powercap-info.c
@@ -47,8 +47,6 @@ static int powercap_print_one_zone(struct powercap_zone *zone)

printf("\n");

- if (ret != 0)
- return ret;
return ret;
}

--
2.43.0