diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 5748c35d0342..45babf2243f3 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -4009,12 +4009,12 @@ sub process { | |||
4009 | } | 4009 | } |
4010 | } | 4010 | } |
4011 | 4011 | ||
4012 | # Return of what appears to be an errno should normally be -'ve | 4012 | # Return of what appears to be an errno should normally be negative |
4013 | if ($line =~ /^.\s*return\s*(E[A-Z]*)\s*;/) { | 4013 | if ($sline =~ /\breturn(?:\s*\(+\s*|\s+)(E[A-Z]+)(?:\s*\)+\s*|\s*)[;:,]/) { |
4014 | my $name = $1; | 4014 | my $name = $1; |
4015 | if ($name ne 'EOF' && $name ne 'ERROR') { | 4015 | if ($name ne 'EOF' && $name ne 'ERROR') { |
4016 | WARN("USE_NEGATIVE_ERRNO", | 4016 | WARN("USE_NEGATIVE_ERRNO", |
4017 | "return of an errno should typically be -ve (return -$1)\n" . $herecurr); | 4017 | "return of an errno should typically be negative (ie: return -$1)\n" . $herecurr); |
4018 | } | 4018 | } |
4019 | } | 4019 | } |
4020 | 4020 | ||