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

Commit 9a5be741 authored by Derek Chen's avatar Derek Chen Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarDerek Chen <chenche@codeaurora.org>
parent 657d8f8a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
// 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;
		}
	}