crypto: qat - fix some timeout tests

Change the timeout condition since the times value would be -1 after
running MAX_RETRY_TIMES.

Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Yang Pingchao <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
Pingchao Yang 2015-12-16 14:09:50 +08:00 • committed by Herbert Xu
commit 51d77dddff

View file

@ -186,7 +186,7 @@ static int qat_hal_wait_cycles(struct icp_qat_fw_loader_handle *handle,
if (elapsed_cycles >= 8 && !(csr & (1 << ACS_ABO_BITPOS)))
return 0;
}
if (!times) {
if (times < 0) {
pr_err("QAT: wait_num_cycles time out\n");
return -EFAULT;
}