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>
这个提交包含在:
Derek Chen
2020-02-13 14:15:01 -08:00
提交者 Gerrit - the friendly Code Review server
父节点 68f58b0d09
当前提交 256b05b2b0

查看文件

@@ -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;
}
}