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 58a94947d655..64ec4b8a51b5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -1889,6 +1889,13 @@ sub process { | |||
1889 | WARN("kfree(NULL) is safe this check is probabally not required\n" . $hereprev); | 1889 | WARN("kfree(NULL) is safe this check is probabally not required\n" . $hereprev); |
1890 | } | 1890 | } |
1891 | } | 1891 | } |
1892 | # check for needless usb_free_urb() checks | ||
1893 | if ($prevline =~ /\bif\s*\(([^\)]*)\)/) { | ||
1894 | my $expr = $1; | ||
1895 | if ($line =~ /\busb_free_urb\(\Q$expr\E\);/) { | ||
1896 | WARN("usb_free_urb(NULL) is safe this check is probabally not required\n" . $hereprev); | ||
1897 | } | ||
1898 | } | ||
1892 | 1899 | ||
1893 | # warn about #ifdefs in C files | 1900 | # warn about #ifdefs in C files |
1894 | # if ($line =~ /^.#\s*if(|n)def/ && ($realfile =~ /\.c$/)) { | 1901 | # if ($line =~ /^.#\s*if(|n)def/ && ($realfile =~ /\.c$/)) { |