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

Commit a9eb4df3 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-removed: page align size on free" into msm-4.9

parents 942ef349 daf65bd1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
/*
 *
 *  Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
 *  Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
 *  Copyright (C) 2000-2004 Russell King
 *
 * This program is free software; you can redistribute it and/or modify
@@ -294,6 +294,7 @@ void removed_free(struct device *dev, size_t size, void *cpu_addr,
	bool no_kernel_mapping = attrs & DMA_ATTR_NO_KERNEL_MAPPING;
	struct removed_region *dma_mem = dev->removed_mem;

	size = PAGE_ALIGN(size);
	if (!no_kernel_mapping)
		iounmap(cpu_addr);
	mutex_lock(&dma_mem->lock);