Skip to content

Commit

Permalink
dmaengine: imx-sdma: Use GFP_NOWAIT for dma allocations
Browse files Browse the repository at this point in the history
The memory allocation in DMA callbacks should use GFP_NOWAIT, so
update this one and fix code alignment for this call while at it.

Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
vinodkoul committed Jul 2, 2018
1 parent 680302c commit c119987
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/dma/imx-sdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1157,8 +1157,8 @@ static int sdma_alloc_bd(struct sdma_desc *desc)
{
int ret = 0;

desc->bd = dma_pool_alloc(desc->sdmac->bd_pool, GFP_ATOMIC,
&desc->bd_phys);
desc->bd = dma_pool_alloc(desc->sdmac->bd_pool, GFP_NOWAIT,
&desc->bd_phys);
if (!desc->bd) {
ret = -ENOMEM;
goto out;
Expand Down

0 comments on commit c119987

Please sign in to comment.