mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
ASoC: msm: unmap and free dma memory if smmu map failed
Unmap and free DMA memory in case of ION SMMU mapping failure from PVM backend or MMHAB. Change-Id: I2d2780941ba6922534654afa463a011f27ef7c66 Signed-off-by: Derek Chen <chenche@codeaurora.org>
This commit is contained in:
parent
68f58b0d09
commit
256b05b2b0
1 changed files with 2 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
|
|
@ -564,6 +564,7 @@ static int msm_audio_ion_map_buf(void *handle, dma_addr_t *paddr,
|
|||
if (rc) {
|
||||
pr_err("%s: failed to do smmu map, err = %d\n",
|
||||
__func__, rc);
|
||||
msm_audio_dma_buf_unmap((struct dma_buf *) handle);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue