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

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

Merge "arm: dma-mapping: Add iova checks in arm_iommu_map_sg"

parents e86abf69 0c2e37c9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1965,6 +1965,8 @@ int arm_iommu_map_sg(struct device *dev, struct scatterlist *sg,
		total_length += s->length;

	iova = __alloc_iova(mapping, total_length);
	if (iova == DMA_ERROR_CODE)
		return 0;
	ret = iommu_map_sg(mapping->domain, iova, sg, nents, prot);
	if (ret != total_length) {
		__free_iova(mapping, iova, total_length);