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

Commit 3a3efda4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: isp: Fix leak in bus evt_payload"

parents 8d51649f 35165dc5
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -1581,6 +1581,7 @@ static int cam_vfe_bus_ver2_handle_irq(uint32_t evt_id,
	struct cam_vfe_bus_ver2_priv          *bus_priv;
	struct cam_irq_controller_reg_info    *reg_info;
	uint32_t                               irq_mask;
	int                                    found = 0;

	handler_priv = th_payload->handler_priv;
	core_info    = handler_priv->core_info;
@@ -1613,6 +1614,8 @@ static int cam_vfe_bus_ver2_handle_irq(uint32_t evt_id,
			irq_reg_offset[i] - (0xC * 2));
		evt_payload->irq_reg_val[i] = irq_mask &
			cam_io_r(handler_priv->mem_base + irq_reg_offset[i]);
		if (evt_payload->irq_reg_val[i])
			found = 1;
		CDBG("irq_status%d = 0x%x\n", i, evt_payload->irq_reg_val[i]);
	}
	for (i = 0; i <= CAM_IFE_IRQ_BUS_REG_STATUS2; i++) {
@@ -1628,7 +1631,13 @@ static int cam_vfe_bus_ver2_handle_irq(uint32_t evt_id,
			reg_info->global_clear_bitmask,
			reg_info->global_clear_offset);

	if (found)
		th_payload->evt_payload_priv = evt_payload;
	else {
		cam_vfe_bus_put_evt_payload(evt_payload->core_info,
			&evt_payload);
		rc = -ENOMSG;
	}

	return rc;
}