]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
drivers: dma-contiguous: refactor dma_alloc_from_contiguous()
authorMichal Nazarewicz <mina86@mina86.com>
Wed, 5 Sep 2012 05:50:41 +0000 (07:50 +0200)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 2 Oct 2012 06:57:45 +0000 (08:57 +0200)
commitbdd43cb39f1b1e897c5d7992d05d0b9f0dd786d1
treeeec00a15f43da4bb55510a6d1542c038a877637e
parenta0d271cbfed1dd50278c6b06bead3d00ba0a88f9
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: Michal Nazarewicz <mina86@mina86.com>
[fixed compilation break caused by missing semicolon]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
drivers/base/dma-contiguous.c