diff options
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 13d7a330b5dd..a4e8087a0cae 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -2078,6 +2078,13 @@ sub process { | |||
2078 | WARN("kfree(NULL) is safe this check is probabally not required\n" . $hereprev); | 2078 | WARN("kfree(NULL) is safe this check is probabally not required\n" . $hereprev); |
2079 | } | 2079 | } |
2080 | } | 2080 | } |
2081 | # check for needless usb_free_urb() checks | ||
2082 | if ($prevline =~ /\bif\s*\(([^\)]*)\)/) { | ||
2083 | my $expr = $1; | ||
2084 | if ($line =~ /\busb_free_urb\(\Q$expr\E\);/) { | ||
2085 | WARN("usb_free_urb(NULL) is safe this check is probably not required\n" . $hereprev); | ||
2086 | } | ||
2087 | } | ||
2081 | 2088 | ||
2082 | # warn about #ifdefs in C files | 2089 | # warn about #ifdefs in C files |
2083 | # if ($line =~ /^.\s*\#\s*if(|n)def/ && ($realfile =~ /\.c$/)) { | 2090 | # if ($line =~ /^.\s*\#\s*if(|n)def/ && ($realfile =~ /\.c$/)) { |