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

Commit f21947b1 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ion: Fix missing mutex_unlock on error path"

parents 2b66d6e0 a1bc21a0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -364,8 +364,10 @@ static struct sg_table *ion_map_dma_buf(struct dma_buf_attachment *attachment,
					 map_attrs);
	}

	if (count <= 0)
	if (count <= 0) {
		mutex_unlock(&buffer->lock);
		return ERR_PTR(-ENOMEM);
	}

	a->dma_mapped = true;
	mutex_unlock(&buffer->lock);