Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
[cascardo/linux.git] / scripts / checkpatch.pl
index 6f2ce0c..4de3cc4 100755 (executable)
@@ -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 {