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

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

Merge "ion: unmap ion buffer before free"

parents 80fe09f4 63ae11ff
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -298,6 +298,8 @@ static void _ion_buffer_destroy(struct kref *kref)
	struct ion_heap *heap = buffer->heap;
	struct ion_device *dev = buffer->dev;

	msm_dma_buf_freed(buffer);

	mutex_lock(&dev->buffer_lock);
	rb_erase(&buffer->node, &dev->buffers);
	mutex_unlock(&dev->buffer_lock);
@@ -315,11 +317,7 @@ static void ion_buffer_get(struct ion_buffer *buffer)

static int ion_buffer_put(struct ion_buffer *buffer)
{
	int ret = kref_put(&buffer->ref, _ion_buffer_destroy);

	if (ret)
		msm_dma_buf_freed(buffer);
	return ret;
	return kref_put(&buffer->ref, _ion_buffer_destroy);
}

static void ion_buffer_add_to_handle(struct ion_buffer *buffer)