]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
cpupower: remove conditional return with no effect
authorSang-Heon Jeon <ekffu200098@gmail.com>
Thu, 23 Jul 2026 18:45:37 +0000 (03:45 +0900)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 4 Aug 2026 19:12:06 +0000 (13:12 -0600)
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.

Link: https://lore.kernel.org/linux-pm/20260723184538.3888637-36-ekffu200098@gmail.com/raw
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/power/cpupower/utils/powercap-info.c

index e53033488218ee62adc1ad2d83a358f19b0046ab..88a5edb76315417081e1777f8e49263001f6b761 100644 (file)
@@ -47,8 +47,6 @@ static int powercap_print_one_zone(struct powercap_zone *zone)
 
        printf("\n");
 
-       if (ret != 0)
-               return ret;
        return ret;
 }