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 <akumarpa@codeaurora.org>
This commit is contained in:
Alok Pandey 2019-12-13 09:49:16 +05:30 • committed by Gerrit - the friendly Code Review server
commit 5f5a2f2028

View file

@ -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: