diff --git a/scripts/checkpatch.sh b/scripts/checkpatch.sh index d0eef683..ae108003 100755 --- a/scripts/checkpatch.sh +++ b/scripts/checkpatch.sh @@ -430,9 +430,9 @@ function check_version() echo "ERROR: ${FILE}: No \"fwver: \" string found in binary" exit 1 fi - FW_VER=`strings ${FILE} | grep -o 'fwver: v[1-9][.][0-9][0-9]' | awk '{ print $2 }'` + FW_VER=`strings ${FILE} | grep -m 1 -o 'fwver: v[1-9][.][0-9][0-9]' | awk '{ print $2 }'` if [ "${NAME_VER}" != "${FW_VER}" ] ; then - echo "ERROR: ${FILE}: file version is ${NAME_VER}, but fw version is ${FW_VER}." + echo "ERROR: ${FILE}: file version is '${NAME_VER}', but fw version is '${FW_VER}'." exit 1 fi done