diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 10384cf406913a5a161121621ec334e86d5e9b7d..a0880ede3db90afea3da829340d669c8ceada038 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4811,13 +4811,13 @@ sub process {
 			}
 		}
 
-# check for case / default statements not preceeded by break/fallthrough/switch
+# check for case / default statements not preceded by break/fallthrough/switch
 		if ($line =~ /^.\s*(?:case\s+(?:$Ident|$Constant)\s*|default):/) {
 			my $has_break = 0;
 			my $has_statement = 0;
 			my $count = 0;
 			my $prevline = $linenr;
-			while ($prevline > 1 && $count < 3 && !$has_break) {
+			while ($prevline > 1 && ($file || $count < 3) && !$has_break) {
 				$prevline--;
 				my $rline = $rawlines[$prevline - 1];
 				my $fline = $lines[$prevline - 1];