Merge "msm: camera: tfe: Add check for num_dev upper bound" into camera-kernel.lnx.7.0

This commit is contained in:
cheese Service 2024-07-26 02:35:48 -07:00 committed by Gerrit - the friendly Code Review server
commit e6a07b89d0

View File

@ -205,7 +205,7 @@ static int cam_tfe_mgr_get_hw_caps_internal(void *hw_mgr_priv,
for (i = 0; i < CAM_TFE_CSID_HW_NUM_MAX; i++) {
if (!hw_mgr->csid_devices[i])
break;
if (query_isp->num_dev < i)
if (i >= query_isp->num_dev)
return -EINVAL;
query_isp->dev_caps[i].hw_type = CAM_ISP_TFE_HW_TFE;