Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34be5de1 authored by Karthik Anantha Ram's avatar Karthik Anantha Ram Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: icp: Move the log after ctx validation



As part of handling frame process we print the dev type,
in case the ctx is already released it leads to a invalid
dereference hence moving the log after checking the ctx state.

Change-Id: I94ef5bbb47a93a28bda22790e7bd6ffe987a4eb6
Signed-off-by: default avatarKarthik Anantha Ram <kartanan@codeaurora.org>
parent ee02364c
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -1464,10 +1464,6 @@ static int cam_icp_mgr_handle_frame_process(uint32_t *msg_ptr, int flag)
		CAM_ERR(CAM_ICP, "Invalid Context");
		return -EINVAL;
	}
	CAM_DBG(CAM_REQ,
		"ctx_id : %u, request_id :%lld dev_type: %d",
		ctx_data->ctx_id, request_id,
		ctx_data->icp_dev_acquire_info->dev_type);

	mutex_lock(&ctx_data->ctx_mutex);
	cam_icp_ctx_timer_reset(ctx_data);
@@ -1478,6 +1474,11 @@ static int cam_icp_mgr_handle_frame_process(uint32_t *msg_ptr, int flag)
		return 0;
	}

	CAM_DBG(CAM_REQ,
		"ctx_id : %u, request_id :%lld dev_type: %d",
		ctx_data->ctx_id, request_id,
		ctx_data->icp_dev_acquire_info->dev_type);

	clk_type = ICP_DEV_TYPE_TO_CLK_TYPE(
			ctx_data->icp_dev_acquire_info->dev_type);
	cam_icp_device_timer_reset(&icp_hw_mgr, clk_type);