Merge "msm: camera: tfe: Fix null pointer deference during acquire failure" into camera-kernel.lnx.7.0

This commit is contained in:
Camera Software Integration
2024-01-22 02:31:09 -08:00
committed by Gerrit - the friendly Code Review server

View File

@@ -2504,13 +2504,15 @@ free_res:
cam_tfe_hw_mgr_release_hw_for_ctx(tfe_ctx); cam_tfe_hw_mgr_release_hw_for_ctx(tfe_ctx);
tfe_ctx->ctx_in_use = 0; tfe_ctx->ctx_in_use = 0;
tfe_ctx->is_rdi_only_context = 0; tfe_ctx->is_rdi_only_context = 0;
tfe_ctx->cdm_handle = 0;
tfe_ctx->cdm_ops = NULL;
tfe_ctx->init_done = false; tfe_ctx->init_done = false;
tfe_ctx->is_dual = false; tfe_ctx->is_dual = false;
free_cdm: free_cdm:
cam_cdm_release(tfe_ctx->cdm_handle); cam_cdm_release(tfe_ctx->cdm_handle);
tfe_ctx->cdm_handle = 0;
tfe_ctx->cdm_ops = NULL;
free_ctx: free_ctx:
kfree(tfe_ctx->tfe_bus_comp_grp);
tfe_ctx->tfe_bus_comp_grp = NULL;
cam_tfe_hw_mgr_put_ctx(&tfe_hw_mgr->free_ctx_list, &tfe_ctx); cam_tfe_hw_mgr_put_ctx(&tfe_hw_mgr->free_ctx_list, &tfe_ctx);
if (in_port) { if (in_port) {
for (i = 0; i < acquire_hw_info->num_inputs; i++) { for (i = 0; i < acquire_hw_info->num_inputs; i++) {
@@ -2521,8 +2523,6 @@ free_ctx:
kfree(in_port); kfree(in_port);
in_port = NULL; in_port = NULL;
} }
kfree(tfe_ctx->tfe_bus_comp_grp);
tfe_ctx->tfe_bus_comp_grp = NULL;
err: err:
/* Dump all the current acquired HW */ /* Dump all the current acquired HW */
cam_tfe_hw_mgr_dump_all_ctx(); cam_tfe_hw_mgr_dump_all_ctx();