diff --git a/[refs] b/[refs] index 39f18af7c9ce..dab9f84755a3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 14b111c158116f02c1c862397075e28ac12d65d6 +refs/heads/master: 1bdab9e5881fde3bf66528db5b91477ce4b35b3b diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 1e7d2cdd0c20..c6782ac6f130 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -1295,7 +1295,11 @@ sub process { } } if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g && - $line !~ /\G(?:\s*{)?(?:\s*$;*)(?:\s*\\)?\s*$/g) { + $line !~ /\G(?: + (?:\s*{)?(?:\s*$;*)(?:\s*\\)?\s*$| + \s*return\s+ + )/xg) + { ERROR("trailing statements should be on next line\n" . $herecurr); }