From 6cd4af283f62ce6cd941642ce97f6d34ae712b89 Mon Sep 17 00:00:00 2001 From: Depeng Shao Date: Thu, 24 Sep 2020 13:20:05 +0800 Subject: [PATCH] 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 --- drivers/cam_req_mgr/cam_req_mgr_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cam_req_mgr/cam_req_mgr_core.c b/drivers/cam_req_mgr/cam_req_mgr_core.c index ee3972096998..11b910818708 100644 --- a/drivers/cam_req_mgr/cam_req_mgr_core.c +++ b/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; } }