提交 512ddf7d 编写于 作者: D Denis Efremov 提交者: Masahiro Yamada

coccicheck: return proper error code on fail

If coccicheck fails, it should return an error code distinct from zero
to signal about an internal problem. Current code instead of exiting with
the tool's error code returns the error code of 'echo "coccicheck failed"'
which is almost always equals to zero, thus failing the original intention
of alerting about a problem. This patch fixes the code.

Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: NDenis Efremov <efremov@linux.com>
Acked-by: NJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
上级 09d4d964
......@@ -128,9 +128,10 @@ run_cmd_parmap() {
fi
echo $@ >>$DEBUG_FILE
$@ 2>>$DEBUG_FILE
if [[ $? -ne 0 ]]; then
err=$?
if [[ $err -ne 0 ]]; then
echo "coccicheck failed"
exit $?
exit $err
fi
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册