From c560d9d31b3f46677509246efb2d01a8834944f8 Mon Sep 17 00:00:00 2001 From: Alamy Liu Date: Mon, 10 Aug 2015 16:20:45 -0700 Subject: [PATCH] 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 --- src/target/arm_adi_v5.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.5