diff --git a/lib/checksrc.pl b/lib/checksrc.pl index c3e79691ccbdc4..9f5058ddb57adc 100755 --- a/lib/checksrc.pl +++ b/lib/checksrc.pl @@ -145,7 +145,7 @@ sub scanfile { } # check for "} else" - if($l =~ /^(.*)\} else/) { + if($l =~ /^(.*)\} *else/) { checkwarn($line, length($1), $file, $l, "else after closing brace on same line"); } # check for "){"