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

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

Merge "ion: don't call free_buffer_page on failure of ion_hyp_unassign_sg"

parents 90b7569d 1ac13084
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -413,11 +413,13 @@ static int ion_system_heap_allocate(struct ion_heap *heap,
	buffer->private_flags |= ION_PRIV_FLAG_SHRINKER_FREE;

	if (vmid > 0)
		ion_hyp_unassign_sg(table, &vmid, 1, true, false);
		if (ion_hyp_unassign_sg(table, &vmid, 1, true, false))
			goto err_free_table_sync;

	for_each_sg(table->sgl, sg, table->nents, i)
		free_buffer_page(sys_heap, buffer, sg_page(sg),
				 get_order(sg->length));
err_free_table_sync:
	if (nents_sync)
		sg_free_table(&table_sync);
err_free_sg: