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

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

Merge "drivers: dma: warn if ioremap fails"

parents b4e79585 3c29c8d8
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -44,14 +44,16 @@ void *removed_alloc(struct device *dev, size_t size, dma_addr_t *handle,

	if (pfn) {
		addr = ioremap(__pfn_to_phys(pfn), size);
		if (WARN_ON(!addr)) {
			dma_release_from_contiguous(dev, pfn, order);
		} else {
			memset(addr, 0, size);
			if (no_kernel_mapping) {
				iounmap(addr);
				addr = (void *)NO_KERNEL_MAPPING_DUMMY;
			}
		if (addr)
			*handle = __pfn_to_phys(pfn);

		}
	}

	return addr;