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

Commit db3da2dc authored by Dhanalakshmi Siddani's avatar Dhanalakshmi Siddani Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm: qdsp6v2: Fix error during memory unmap



ION memory unmap is failing because of invalid handle.
Make handle NULL after freeing up memory.

CRs-fixed: 861990
Change-Id: I3982df09cc0632d68cef90cc66cdf9f573f9784b
Signed-off-by: default avatarDhanalakshmi Siddani <dsiddani@codeaurora.org>
parent c952020e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -408,6 +408,8 @@ static void _reg_ion_mem_NT(void)
	if (rc < 0) {
		eagle_drv_err("%s: memory map failed", __func__);
		msm_audio_ion_free(_ion_client_NT, _ion_handle_NT);
		_ion_client_NT = NULL;
		_ion_handle_NT = NULL;
	}
}

@@ -420,6 +422,9 @@ static void _unreg_ion_mem_NT(void)
	rc = msm_audio_ion_free(_ion_client_NT, _ion_handle_NT);
	if (rc < 0)
		eagle_drv_err("%s: mem free failed", __func__);

	_ion_client_NT = NULL;
	_ion_handle_NT = NULL;
}

static struct audio_client *_getNTDeviceAC(void)