summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-10-29 15:34:39 -0700
committerDavid S. Miller <davem@davemloft.net>2008-10-29 15:34:39 -0700
commitbe376649344ba2c3d00021f8bbf64392aa01ad55 (patch)
tree53e538b57a6d5ceb7d61ad76342a1a72f32f5863 /sound
parent1758ef68a07f42983371dc1d2bf0ae80b4d8ea16 (diff)
downloadlinux-stable-be376649344ba2c3d00021f8bbf64392aa01ad55.tar.gz
linux-stable-be376649344ba2c3d00021f8bbf64392aa01ad55.tar.bz2
linux-stable-be376649344ba2c3d00021f8bbf64392aa01ad55.zip
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/sparc/dbri.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index c257ad8bdfbc..23ed6f04a718 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -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",