Переглянути джерело

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>
Pingchao Yang 9 роки тому
батько
коміт
51d77dddff
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      drivers/crypto/qat/qat_common/qat_hal.c

+ 1 - 1
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;
 	}