Ver Fonte

msm: camera: cpas: Reorder sequence of cleanup in cpas probe failure

if cpas probe fails during initialization of soc resources
soc data is being accessed after freeing the memory.
This change handling the sequence on failure.

CRs-Fixed: 2585085
Change-Id: Ia89b02bce9cfb6512b33f8e7366a552635317ccd
Signed-off-by: Alok Pandey <[email protected]>
Alok Pandey há 5 anos atrás
pai
commit
5f5a2f2028
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      drivers/cam_cpas/cam_cpas_hw.c

+ 1 - 1
drivers/cam_cpas/cam_cpas_hw.c

@@ -1795,10 +1795,10 @@ ahb_cleanup:
 	cam_cpas_util_unregister_bus_client(&cpas_core->ahb_bus_client);
 client_cleanup:
 	cam_cpas_util_client_cleanup(cpas_hw);
+	cam_cpas_node_tree_cleanup(cpas_core, cpas_hw->soc_info.soc_private);
 deinit_platform_res:
 	cam_cpas_soc_deinit_resources(&cpas_hw->soc_info);
 release_workq:
-	cam_cpas_node_tree_cleanup(cpas_core, cpas_hw->soc_info.soc_private);
 	flush_workqueue(cpas_core->work_queue);
 	destroy_workqueue(cpas_core->work_queue);
 release_mem: