History

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.

Jerome Forissier committed 9 years ago

Commit f2c19c21 parent a2ef9471 file · +1 −1Browse files

Unified · Split

scripts/checkpatch.pl+1−1
@@ -761,7 +761,7 @@ sub seed_camelcase_file { · 760 unmodified lines
761sub is_maintained_obsolete {761sub is_maintained_obsolete {
762 my ($filename) = @_;762 my ($filename) = @_;
763 763
764 return 0 if (!(-e "$root/scripts/get_maintainer.pl"));764 return 0 if (!$tree || !(-e "$root/scripts/get_maintainer.pl"));
765 765
766 my $status = `perl $root/scripts/get_maintainer.pl --status --nom --nol --nogit --nogit-fallback -f $filename 2>&1`;766 my $status = `perl $root/scripts/get_maintainer.pl --status --nom --nol --nogit --nogit-fallback -f $filename 2>&1`;
767 767