diff options
| author | Steve French <sfrench@us.ibm.com> | 2008-04-26 00:20:10 +0400 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2008-04-26 00:20:10 +0400 |
| commit | 404e86e1550cc2c84bb57a372af784585c732f9a (patch) | |
| tree | c0e8e2d61c1b1c79705c0dc9f0f16e35267286e4 /scripts/checkpatch.pl | |
| parent | 0206e61b467fde4d7b50f1a64355182a4fd9576b (diff) | |
| parent | b9fa38f75ea7e1f64bc29653ca9758303ce698e4 (diff) | |
| download | linux-404e86e1550cc2c84bb57a372af784585c732f9a.tar.xz | |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
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 { WARN("kfree(NULL) is safe this check is probabally not required\n" . $hereprev); } } +# check for needless usb_free_urb() checks + if ($prevline =~ /\bif\s*\(([^\)]*)\)/) { + my $expr = $1; + if ($line =~ /\busb_free_urb\(\Q$expr\E\);/) { + WARN("usb_free_urb(NULL) is safe this check is probabally not required\n" . $hereprev); + } + } # warn about #ifdefs in C files # if ($line =~ /^.#\s*if(|n)def/ && ($realfile =~ /\.c$/)) { |
