Skip to content

Commit 0d5cb73

Browse files
jxu75herbertx
authored andcommitted
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 <[email protected]> Reviewed-by: Ahsan Atta <[email protected]> Reviewed-by: Giovanni Cabiddu <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Giovanni Cabiddu <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent bd2c6e0 commit 0d5cb73

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/crypto/intel/qat/qat_common/qat_uclo.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,10 +1418,6 @@ static int qat_uclo_map_auth_fw(struct icp_qat_fw_loader_handle *handle,
14181418
struct icp_qat_simg_ae_mode *simg_ae_mode;
14191419
struct icp_firml_dram_desc img_desc;
14201420

1421-
if (size > (ICP_QAT_AE_IMG_OFFSET(handle) + ICP_QAT_CSS_RSA4K_MAX_IMAGE_LEN)) {
1422-
pr_err("QAT: error, input image size overflow %d\n", size);
1423-
return -EINVAL;
1424-
}
14251421
length = (css_hdr->fw_type == CSS_AE_FIRMWARE) ?
14261422
ICP_QAT_CSS_AE_SIMG_LEN(handle) + simg_offset :
14271423
size + ICP_QAT_CSS_FWSK_PAD_LEN(handle) + simg_offset;

0 commit comments

Comments
 (0)