Skip to content
Commit bdd43cb3 authored by Michal Nazarewicz's avatar Michal Nazarewicz Committed by Marek Szyprowski
Browse files

drivers: dma-contiguous: refactor dma_alloc_from_contiguous()



The dma_alloc_from_contiguous() function returns either a valid pointer
to a page structure or NULL, the error code set when pageno >= cma->count
is not used at all and can be safely removed.

This commit also changes the function to avoid goto and have only one exit
path and one place where mutex is unlocked.

Signed-off-by: default avatarMichal Nazarewicz <mina86@mina86.com>
[fixed compilation break caused by missing semicolon]
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
parent a0d271cb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment