Skip to content

Commit f2c19c2

Browse files
jforissiertorvalds
authored andcommitted
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>
1 parent a2ef947 commit f2c19c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/checkpatch.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ sub seed_camelcase_file {
761761
sub is_maintained_obsolete {
762762
my ($filename) = @_;
763763

764-
return 0 if (!(-e "$root/scripts/get_maintainer.pl"));
764+
return 0 if (!$tree || !(-e "$root/scripts/get_maintainer.pl"));
765765

766766
my $status = `perl $root/scripts/get_maintainer.pl --status --nom --nol --nogit --nogit-fallback -f $filename 2>&1`;
767767

0 commit comments

Comments
 (0)