summaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorPingchao Yang <pingchao.yang@intel.com>2015-12-16 14:09:50 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2015-12-22 20:43:32 +0800
commit51d77dddfff4a554744bfa0e67cf571319635645 (patch)
treedfe74a947788815ec4f176b917ba39ff611790d2 /drivers/crypto
parent46621e6f84908bb9df494d5fc2bcd145041810d5 (diff)
downloadop-kernel-dev-51d77dddfff4a554744bfa0e67cf571319635645.zip
op-kernel-dev-51d77dddfff4a554744bfa0e67cf571319635645.tar.gz
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 <dan.carpenter@oracle.com> Signed-off-by: Yang Pingchao <pingchao.yang@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/qat/qat_common/qat_hal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/qat/qat_common/qat_hal.c b/drivers/crypto/qat/qat_common/qat_hal.c
index 81bd1fe..0ac0ba8 100644
--- a/drivers/crypto/qat/qat_common/qat_hal.c
+++ b/drivers/crypto/qat/qat_common/qat_hal.c
@@ -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;
}
OpenPOWER on IntegriCloud