소스 검색

msm: camera: isp: Fix for NULL dereference for failure case of dual IFE

In the case of dual IFE acquire if left CSID reserve fails there is a
possibility of NULL pointer dereference.

CRs-Fixed: 2823225
Change-Id: Ib2bef582f69b245ee1d5b5b9ee8f5dacf8e2607a
Signed-off-by: Wyes Karny <[email protected]>
Wyes Karny 4 년 전
부모
커밋
c861a8d97a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

+ 1 - 1
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

@@ -1909,7 +1909,7 @@ acquire_successful:
 				break;
 		}
 
-		if (j == CAM_IFE_CSID_HW_NUM_MAX) {
+		if (j == -1 || !csid_acquire.node_res) {
 			CAM_ERR(CAM_ISP,
 				"Can not acquire ife csid dual resource");
 			goto end;