From: Alamy Liu Date: Mon, 10 Aug 2015 23:20:45 +0000 (-0700) Subject: adi_v5: return proper value on timeout X-Git-Tag: v0.10.0-rc1~322 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c560d9d31b3f46677509246efb2d01a8834944f8;p=openocd adi_v5: return proper value on timeout ERROR_WAIT is better than ERROR_FAIL in timeout condition. Change-Id: Iefe837f276a9091ce6c18db5947212c449f49d89 Signed-off-by: Alamy Liu Reviewed-on: http://openocd.zylin.com/2934 Tested-by: jenkins Reviewed-by: Andreas Fritiofson --- diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h index 7140c8dc..1c4b1000 100644 --- a/src/target/arm_adi_v5.h +++ b/src/target/arm_adi_v5.h @@ -403,7 +403,7 @@ static inline int dap_dp_poll_register(struct adiv5_dap *dap, unsigned reg, if (!timeout) { LOG_DEBUG("DAP: poll %x timeout", reg); - return ERROR_FAIL; + return ERROR_WAIT; } else { return ERROR_OK; }