scripts: fix automatic jenkins verification [1/1]

PD#SWPL-67525

Problem:
fix automatic jenkins verification

Solution:
fix automatic jenkins verification

Verify:
ad401_a113l

Change-Id: I5f7122b3ae2cc0aefb52bb5a7118a1dbf64343b6
Signed-off-by: Kelvin Zhang <kelvin.zhang@amlogic.com>
diff --git a/gerrit_review.sh b/gerrit_review.sh
index c16fa2d..ccbcffe 100755
--- a/gerrit_review.sh
+++ b/gerrit_review.sh
@@ -17,19 +17,15 @@
 	[ ! -f "$GERRIT_QUERY_RESULT" ] && echo "${FUNCNAME[0]}: No such file! $GERRIT_QUERY_RESULT" && exit 1
 	[ $# -ne 1 ] && echo "${FUNCNAME[0]}: Invalid parameters! $*" && exit 1
 
-	if [ "$1" = "SUCCESS" ]; then
-		verify_score="+1"
-	elif [ "$1" = "FAIL" ]; then
-		verify_score="-1"
-	else
-		echo "${FUNCNAME[0]}: Invalid parameter $1" && exit 1
-	fi
-
 	if [ "$1" = "Start" ]; then
 		verify_param=""
-	else
+	elif [ "$1" = "SUCCESS" ] || [ "$1" = "FAIL" ]; then
+		[ "$1" = "SUCCESS" ] && verify_score="+1"
+		[ "$1" = "FAIL" ] && verify_score="-1"
 		verify_param="--verified $verify_score"
 		echo -e "======== Verifying Gerrit Topic: $MANUAL_GERRIT_TOPIC ========"
+	else
+		echo "${FUNCNAME[0]}: Invalid parameter $1" && exit 1
 	fi
 
 	review_msg="Build ${BUILD_URL}: $1"
@@ -58,7 +54,5 @@
 		[ "$i" -gt 1 ] && echo -e "======== Verified $i Gerrit changes for $MANUAL_GERRIT_TOPIC ========\n"
 	fi
 
-	if [ "$1" = "FAIL" ]; then
-		exit 1
-	fi
+	[ "$1" = "FAIL" ] && exit 1
 }