Skip to content

Commit

Permalink
checkpatch: don't try to get maintained status when --no-tree is given
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Jerome Forissier <[email protected]>
Reviewed-by: Brian Norris <[email protected]>
Acked-by: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
jforissier authored and torvalds committed Dec 13, 2016
1 parent a2ef947 commit f2c19c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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`;

Expand Down

0 comments on commit f2c19c2

Please sign in to comment.