Selaa lähdekoodia

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 vuotta sitten
vanhempi
sitoutus
6cd4af283f
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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;
 		}
 	}