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

Commit 97848d74 authored by Harsh Shah's avatar Harsh Shah
Browse files

msm: camera: isp: Add missing BUS deinit call



In VFE core init, there is a call to BUS init. But the deinit
call to BUS was missing. This would result in memory leak in IRQ
controller and possible bugs by stale data in variables. Added
the missing call.

Change-Id: I8b909c56c5d72afcd96a03e560cd3f27963a7249
Signed-off-by: default avatarHarsh Shah <harshs@codeaurora.org>
parent de8b7f5d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -207,6 +207,7 @@ int cam_vfe_deinit_hw(void *hw_priv, void *deinit_hw_args, uint32_t arg_size)
{
	struct cam_hw_info                *vfe_hw = hw_priv;
	struct cam_hw_soc_info            *soc_info = NULL;
	struct cam_vfe_hw_core_info       *core_info = NULL;
	int rc = 0;

	CAM_DBG(CAM_ISP, "Enter");
@@ -230,6 +231,12 @@ int cam_vfe_deinit_hw(void *hw_priv, void *deinit_hw_args, uint32_t arg_size)
	mutex_unlock(&vfe_hw->hw_mutex);

	soc_info = &vfe_hw->soc_info;
	core_info = (struct cam_vfe_hw_core_info *)vfe_hw->core_info;

	rc = core_info->vfe_bus->hw_ops.deinit(core_info->vfe_bus->bus_priv,
		NULL, 0);
	if (rc)
		CAM_ERR(CAM_ISP, "Bus HW deinit Failed rc=%d", rc);

	/* Turn OFF Regulators, Clocks and other SOC resources */
	CAM_DBG(CAM_ISP, "Disable SOC resource");