diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 6f2ce0cafe6f5b998892a6f54b0380d1e85f77b2..4de3cc42fc50dca7a3d620ccca99cb4a55b685f5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -228,9 +228,9 @@ if ($^V && $^V lt $minimum_perl_version) { } } +#if no filenames are given, push '-' to read patch from stdin if ($#ARGV < 0) { - print "$P: no input files\n"; - exit(1); + push(@ARGV, '-'); } sub hash_save_array_words {