From 1e1c1e132b958bace6599d4c7a1159d398bae5d2 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 30 Jan 2018 10:48:03 -0500 Subject: [PATCH] tools: return exit status in checkpatch.sh Signed-off-by: Quentin Young --- tools/checkpatch.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/checkpatch.sh b/tools/checkpatch.sh index 42ea8dbb38..3536df79a9 100755 --- a/tools/checkpatch.sh +++ b/tools/checkpatch.sh @@ -7,6 +7,7 @@ checkpatch="$tree/tools/checkpatch.pl --no-tree -f" ignore="ldpd\|babeld" cwd=${PWD##*/} dirty=0 +stat=0 if [[ -z "$1" || -z "$2" ]]; then echo "$usage" @@ -66,6 +67,9 @@ else else cat $file | grep -v "normally be const" | grep -A3 "ERROR\|WARNING" fi + if [ "$?" -eq "0" ]; then + stat=1 + fi done fi @@ -79,3 +83,5 @@ if [ $dirty -eq 1 ]; then fi git -C $tree config --unset gc.auto; fi + +exit $stat