Skip to content

Commit

Permalink
dbri: check dma_alloc_coherent errors
Browse files Browse the repository at this point in the history
Needs to check for dma_alloc_coherent() allocation failure.

Signed-off-by: FUJITA Tomonori <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
fujita authored and davem330 committed Oct 29, 2008
1 parent 1758ef6 commit be37664
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/sparc/dbri.c
Original file line number Diff line number Diff line change
Expand Up @@ -2534,6 +2534,8 @@ static int __devinit snd_dbri_create(struct snd_card *card,
dbri->dma = dma_alloc_coherent(&op->dev,
sizeof(struct dbri_dma),
&dbri->dma_dvma, GFP_ATOMIC);
if (!dbri->dma)
return -ENOMEM;
memset((void *)dbri->dma, 0, sizeof(struct dbri_dma));

dprintk(D_GEN, "DMA Cmd Block 0x%p (0x%08x)\n",
Expand Down

0 comments on commit be37664

Please sign in to comment.