]> git.baikalelectronics.ru Git - kernel.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)
commit94d8975b41ddafa48a263ae90df92edaeac04595
treeeec00a15f43da4bb55510a6d1542c038a877637e
parentcd51c56a48839bb64110da1630f05af7f35b5857
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