]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - scripts/checkpatch.pl
checkpatch: if should not continue a preceeding brace
[linux-2.6-omap-h63xx.git] / scripts / checkpatch.pl
index 696196e194f5320a176afe140fd9b871df919bc9..5ea55e330c2444bdc8a18166a094801909a77ae1 100755 (executable)
@@ -2108,6 +2108,11 @@ sub process {
                                ERROR("trailing statements should be on next line\n" . $herecurr);
                        }
                }
+# if should not continue a brace
+               if ($line =~ /}\s*if\b/) {
+                       ERROR("trailing statements should be on next line\n" .
+                               $herecurr);
+               }
 # case and default should not have general statements after them
                if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
                    $line !~ /\G(?: