From: Peter Senna Tschudin Date: Tue, 29 Jul 2014 16:12:20 +0000 (+0200) Subject: cpupower: Remove redundant error check X-Git-Tag: omap-for-v3.17/fixes-against-rc2~142^2~3^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=059802f961db9717412b6958111ca1cd1865726e;p=pandora-kernel.git cpupower: Remove redundant error check Remove double checks, and move the call to print_error to the first check. Replace break by return, and return 0 on success. The simplified version of the coccinelle semantic patch that fixes this issue is as follows: // @@ expression E; identifier pr; expression list es; @@ for(...;...;...){ ... - if (E) break; + if (E){ + pr(es); + break; + } ... } - if(E) pr(es); // Signed-off-by: Peter Senna Tschudin Signed-off-by: Thomas Renninger Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed