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

Commit 774b550c authored by Camera Software Integration's avatar Camera Software Integration Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: tfe: Fix dereference of pointer before NULL check" into camera-kernel.lnx.4.0

parents b8070c34 e3c0176a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6098,7 +6098,7 @@ static int cam_isp_context_dump_requests(void *data,
static int cam_isp_context_handle_message(void *context,
	uint32_t msg_type, uint32_t *data)
{
	int                            rc = 0;
	int                            rc = -EINVAL;
	struct cam_hw_cmd_args         hw_cmd_args;
	struct cam_isp_hw_cmd_args     isp_hw_cmd_args;
	struct cam_context            *ctx = (struct cam_context *)context;
+12 −7
Original line number Diff line number Diff line
@@ -319,9 +319,10 @@ static int cam_tfe_hw_mgr_get_clock_rate(
			continue;

		hw_intf = isp_hw_res->hw_res[i]->hw_intf;
		if (hw_intf && hw_intf->hw_ops.process_cmd) {
			CAM_DBG(CAM_ISP, "hw type %d hw index:%d",
				hw_intf->hw_type, hw_intf->hw_idx);
		if (hw_intf && hw_intf->hw_ops.process_cmd) {

			rc = hw_intf->hw_ops.process_cmd(
				hw_intf->hw_priv,
				CAM_ISP_HW_CMD_GET_CLOCK_RATE,
@@ -343,7 +344,7 @@ static int cam_tfe_hw_mgr_update_clock_rate(
	uint32_t                    *updated_clock_rate)
{
	int i;
	int rc = 0;
	int rc = -EINVAL;
	struct cam_hw_intf      *hw_intf;

	for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) {
@@ -351,29 +352,33 @@ static int cam_tfe_hw_mgr_update_clock_rate(
			continue;

		hw_intf = isp_hw_res->hw_res[i]->hw_intf;

		if (hw_intf && hw_intf->hw_ops.process_cmd) {
			CAM_DBG(CAM_ISP, "hw type %d hw index:%d",
				hw_intf->hw_type, hw_intf->hw_idx);

		if (hw_intf && hw_intf->hw_ops.process_cmd) {
			rc = hw_intf->hw_ops.process_cmd(
				hw_intf->hw_priv,
				CAM_ISP_HW_CMD_DYNAMIC_CLOCK_UPDATE,
				set_clock_rate,
				sizeof(uint32_t));
			if (rc) {
				CAM_ERR(CAM_ISP, "Failed to get Clock rate");
				CAM_ERR(CAM_ISP, "Failed to set Clock rate");
				return rc;
			}
		}

		if (hw_intf && hw_intf->hw_ops.process_cmd) {
			CAM_DBG(CAM_ISP, "hw type %d hw index:%d",
				hw_intf->hw_type, hw_intf->hw_idx);

			rc = hw_intf->hw_ops.process_cmd(
				hw_intf->hw_priv,
				CAM_ISP_HW_CMD_GET_CLOCK_RATE,
				updated_clock_rate,
				sizeof(uint32_t));
			if (rc) {
				CAM_ERR(CAM_ISP, "Failed to get Clock rate");
				CAM_ERR(CAM_ISP, "Failed to get updated clock rate");
				return rc;
			}
		}