Sfoglia il codice sorgente

Merge "msm: camera: reqmgr: Fix the crm driver" into camera-kernel.lnx.5.0

Haritha Chintalapati 3 anni fa
parent
commit
0af295b8f6
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      drivers/cam_req_mgr/cam_req_mgr_core.c

+ 4 - 1
drivers/cam_req_mgr/cam_req_mgr_core.c

@@ -2638,8 +2638,11 @@ static int __cam_req_mgr_try_cancel_req(struct cam_req_mgr_core_link *link,
 	case CRM_SLOT_STATUS_REQ_PENDING:
 	case CRM_SLOT_STATUS_REQ_APPLIED:
 		pd = __cam_req_mgr_get_dev_pd(link, CAM_REQ_MGR_DEVICE_IFE);
-		if (pd < 0)
+		if ((pd < 0) || (pd >= CAM_PIPELINE_DELAY_MAX)) {
+			CAM_ERR(CAM_CRM, "pd: %d link_hdl: 0x%x red_id: %d", pd,
+				link->link_hdl, flush_info->req_id);
 			return pd;
+		}
 
 		if (flush_info->req_id <= link->req.prev_apply_data[pd].req_id) {
 			CAM_WARN(CAM_CRM, "req %lld already applied to IFE on link 0x%x",