Commit 3b5c130f authored by Jack Xu's avatar Jack Xu Committed by Herbert Xu

crypto: qat - fix status check in qat_hal_put_rel_rd_xfer()

The return value of qat_hal_rd_ae_csr() is always a CSR value and never
a status and should not be stored in the status variable of
qat_hal_put_rel_rd_xfer().

This removes the assignment as qat_hal_rd_ae_csr() is not expected to
fail.
A more comprehensive handling of the theoretical corner case which could
result in a fail will be submitted in a separate patch.

Fixes: 8c9478a4 ("crypto: qat - reduce stack size with KASAN")
Signed-off-by: default avatarJack Xu <jack.xu@intel.com>
Reviewed-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: default avatarFiona Trahe <fiona.trahe@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent f21406b0
...@@ -1149,7 +1149,7 @@ static int qat_hal_put_rel_rd_xfer(struct icp_qat_fw_loader_handle *handle, ...@@ -1149,7 +1149,7 @@ static int qat_hal_put_rel_rd_xfer(struct icp_qat_fw_loader_handle *handle,
unsigned short mask; unsigned short mask;
unsigned short dr_offset = 0x10; unsigned short dr_offset = 0x10;
status = ctx_enables = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); ctx_enables = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES);
if (CE_INUSE_CONTEXTS & ctx_enables) { if (CE_INUSE_CONTEXTS & ctx_enables) {
if (ctx & 0x1) { if (ctx & 0x1) {
pr_err("QAT: bad 4-ctx mode,ctx=0x%x\n", ctx); pr_err("QAT: bad 4-ctx mode,ctx=0x%x\n", ctx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment