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

Merge "gpu: ion: Return correct error code at alloc fail"

parents acd616a8 00fc192c
......@@ -82,8 +82,10 @@ static int ion_iommu_heap_allocate(struct ion_heap *heap,
for_each_sg(table->sgl, sg, table->nents, i) {
data->pages[i] = alloc_page(
GFP_KERNEL | __GFP_HIGHMEM);
if (!data->pages[i])
if (!data->pages[i]) {
ret = -ENOMEM;
goto err3;
}
sg_set_page(sg, data->pages[i], PAGE_SIZE, 0);
sg_dma_address(sg) = sg_phys(sg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment