Commit dea33496 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Linus Torvalds
Browse files

checkpatch: suppress errors triggered by short patch

When the last hunk of a patch is short it will trigger errors from

    Use of uninitialized value in pattern match (m//)
	    at /usr/local/bin/ line 394.
    Use of uninitialized value in concatenation (.) or string
	    at /usr/local/bin/ line 397.
    Use of uninitialized value in pattern match (m//)

Avoid touching beyond the last line.  Reported by Julien Brunel.
Signed-off-by: default avatarAndy Whitcroft <>
Cc: Julien Brunel <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent a1080bf8
......@@ -408,6 +408,7 @@ sub ctx_statement_block {
# context.
if ($off >= $len) {
for (; $remain > 0; $line++) {
last if (!defined $lines[$line]);
next if ($lines[$line] =~ /^-/);
$loff = $len;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment