浏览代码

msm: camera: reqmgr: Reset the number of sync links

This change resets the number of sync links in
case unsync link fails due to any reason, which
will result in device crash, since the number of
sync links can be increased to an invalid value,
then we will get an invalid link.

CRs-Fixed: 2786144
Change-Id: I61bbac9849ce80c319de40ffae411f61c8deeaa9
Signed-off-by: Depeng Shao <[email protected]>
Depeng Shao 4 年之前
父节点
当前提交
6cd4af283f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/cam_req_mgr/cam_req_mgr_core.c

+ 1 - 1
drivers/cam_req_mgr/cam_req_mgr_core.c

@@ -4026,6 +4026,7 @@ int cam_req_mgr_sync_config(
 		link[i]->is_master = false;
 		link[i]->in_msync_mode = false;
 		link[i]->initial_sync_req = -1;
+		link[i]->num_sync_links = 0;
 
 		for (j = 0; j < sync_info->num_links-1; j++)
 			link[i]->sync_link[j] = NULL;
@@ -4054,7 +4055,6 @@ int cam_req_mgr_sync_config(
 		for (j = 0; j < sync_info->num_links; j++) {
 			link[j]->initial_skip = true;
 			link[j]->sof_timestamp = 0;
-			link[j]->num_sync_links = 0;
 		}
 	}