diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 25adf9811a2c..eced9b303995 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -852,9 +852,10 @@ sub is_maintained_obsolete { | |||
852 | sub is_SPDX_License_valid { | 852 | sub is_SPDX_License_valid { |
853 | my ($license) = @_; | 853 | my ($license) = @_; |
854 | 854 | ||
855 | return 1 if (!$tree || which("python") eq "" || !(-e "$root/scripts/spdxcheck.py")); | 855 | return 1 if (!$tree || which("python") eq "" || !(-e "$root/scripts/spdxcheck.py") || !(-e "$root/.git")); |
856 | 856 | ||
857 | my $status = `echo "$license" | python $root/scripts/spdxcheck.py -`; | 857 | my $root_path = abs_path($root); |
858 | my $status = `cd "$root_path"; echo "$license" | python scripts/spdxcheck.py -`; | ||
858 | return 0 if ($status ne ""); | 859 | return 0 if ($status ne ""); |
859 | return 1; | 860 | return 1; |
860 | } | 861 | } |