summaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorJerome Forissier <jerome.forissier@linaro.org>2016-12-12 16:46:23 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-12 18:55:10 -0800
commitf2c19c2f380fcfdc85eb750016d73f7cd3e77573 (patch)
tree7be337aca22e6ea49ceab1214af2f37f3ca5880a /scripts/checkpatch.pl
parenta2ef9471c771427c2ddd56677b8de45021f6fd71 (diff)
downloadlinux-rpi-f2c19c2f380fcfdc85eb750016d73f7cd3e77573.tar.gz
linux-rpi-f2c19c2f380fcfdc85eb750016d73f7cd3e77573.tar.bz2
linux-rpi-f2c19c2f380fcfdc85eb750016d73f7cd3e77573.zip
checkpatch: don't try to get maintained status when --no-tree is given
Fixes the following warning: Use of uninitialized value $root in concatenation (.) or string at /path/to/checkpatch.pl line 764. Link: http://lkml.kernel.org/r/1476719709-16668-1-git-send-email-jerome.forissier@linaro.org Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 23f462f64a3f..7000adb5820c 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -761,7 +761,7 @@ sub seed_camelcase_file {
sub is_maintained_obsolete {
my ($filename) = @_;
- return 0 if (!(-e "$root/scripts/get_maintainer.pl"));
+ return 0 if (!$tree || !(-e "$root/scripts/get_maintainer.pl"));
my $status = `perl $root/scripts/get_maintainer.pl --status --nom --nol --nogit --nogit-fallback -f $filename 2>&1`;