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 <alamy.liu@gmail.com>
Reviewed-on: http://openocd.zylin.com/2934
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
__archive__
Alamy Liu 2015-08-10 16:20:45 -07:00 committed by Andreas Fritiofson
parent 4dc012865f
commit c560d9d31b
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}