diff options
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 12db1483e6c2..7fb73d92801c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -5104,6 +5104,12 @@ sub process { | |||
5104 | } | 5104 | } |
5105 | } | 5105 | } |
5106 | 5106 | ||
5107 | # check for single line unbalanced braces | ||
5108 | if ($sline =~ /.\s*\}\s*else\s*$/ || | ||
5109 | $sline =~ /.\s*else\s*\{\s*$/) { | ||
5110 | CHK("BRACES", "Unbalanced braces around else statement\n" . $herecurr); | ||
5111 | } | ||
5112 | |||
5107 | # check for unnecessary blank lines around braces | 5113 | # check for unnecessary blank lines around braces |
5108 | if (($line =~ /^.\s*}\s*$/ && $prevrawline =~ /^.\s*$/)) { | 5114 | if (($line =~ /^.\s*}\s*$/ && $prevrawline =~ /^.\s*$/)) { |
5109 | if (CHK("BRACES", | 5115 | if (CHK("BRACES", |