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

Commit 181df267 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ADSPRPC: Call free only when allocation succeed"

parents 71346b8b 0a4f6d46
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -417,10 +417,12 @@ static void fastrpc_mmap_free(struct fastrpc_mmap *map)
			pr_err("failed to free remote heap allocation\n");
			return;
		}
		if (map->phys) {
			dma_set_attr(DMA_ATTR_SKIP_ZEROING, &attrs);
			dma_set_attr(DMA_ATTR_NO_KERNEL_MAPPING, &attrs);
			dma_free_attrs(me->adsp_mem_device, map->size,
					&(map->va), map->phys,	&attrs);
		}
	} else {
		if (!IS_ERR_OR_NULL(map->handle))
			ion_free(fl->apps->client, map->handle);