generate_git: Fix check for existence of series file

$SERIES always contains at least the string "/series", so the check for
a zero-length string never triggers.

To fix this, check for the existence of the file instead.

Signed-off-by: Geert Uytterhoeven <>
Signed-off-by: Greg Kroah-Hartman <>
diff --git a/scripts/generate_git b/scripts/generate_git
index 1eb4462..248939a 100755
--- a/scripts/generate_git
+++ b/scripts/generate_git
@@ -26,7 +26,7 @@
 DIR=`dirname $0 |sed 's/scripts$//'`
-if [ -z "$SERIES" ]; then
+if [ ! -f "$SERIES" ]; then
 	echo Cant find series file at $SERIES
 	exit 1