summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Xu <jack.xu@intel.com>2025-03-14 15:57:53 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2025-03-21 12:33:39 +0300
commit0d5cb730b59ba23d6472b8b1eacd351e7bc48c2b (patch)
tree0d3dbec447f7a4a7ca531bc2a04aeff701c1699c
parentbd2c6e0e0616ae10eaf73f34223680ae406c5d42 (diff)
downloadlinux-0d5cb730b59ba23d6472b8b1eacd351e7bc48c2b.tar.xz
crypto: qat - remove redundant FW image size check
The FW image size check is already performed in the function qat_uclo_check_image() before calling `qat_uclo_map_auth_fw()`. Therefore, the additional check in `qat_uclo_map_auth_fw()` is redundant and can be safely removed. Signed-off-by: Jack Xu <jack.xu@intel.com> Reviewed-by: Ahsan Atta <ahsan.atta@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/crypto/intel/qat/qat_common/qat_uclo.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/crypto/intel/qat/qat_common/qat_uclo.c b/drivers/crypto/intel/qat/qat_common/qat_uclo.c
index 5ace036addec..61be6df50684 100644
--- a/drivers/crypto/intel/qat/qat_common/qat_uclo.c
+++ b/drivers/crypto/intel/qat/qat_common/qat_uclo.c
@@ -1418,10 +1418,6 @@ static int qat_uclo_map_auth_fw(struct icp_qat_fw_loader_handle *handle,
struct icp_qat_simg_ae_mode *simg_ae_mode;
struct icp_firml_dram_desc img_desc;
- if (size > (ICP_QAT_AE_IMG_OFFSET(handle) + ICP_QAT_CSS_RSA4K_MAX_IMAGE_LEN)) {
- pr_err("QAT: error, input image size overflow %d\n", size);
- return -EINVAL;
- }
length = (css_hdr->fw_type == CSS_AE_FIRMWARE) ?
ICP_QAT_CSS_AE_SIMG_LEN(handle) + simg_offset :
size + ICP_QAT_CSS_FWSK_PAD_LEN(handle) + simg_offset;