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>
This commit is contained in:
parent
4dc012865f
commit
c560d9d31b
|
@ -403,7 +403,7 @@ static inline int dap_dp_poll_register(struct adiv5_dap *dap, unsigned reg,
|
||||||
|
|
||||||
if (!timeout) {
|
if (!timeout) {
|
||||||
LOG_DEBUG("DAP: poll %x timeout", reg);
|
LOG_DEBUG("DAP: poll %x timeout", reg);
|
||||||
return ERROR_FAIL;
|
return ERROR_WAIT;
|
||||||
} else {
|
} else {
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue