mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-04 22:21:23 +00:00
dbri: check dma_alloc_coherent errors
Needs to check for dma_alloc_coherent() allocation failure. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1758ef68a0
commit
be37664934
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user