Skip to contentSkip to conversation

ALSA: Ensure PXA runtime data is initialised

PATCH In review Mark Brown 2 participants 2 messages Oct 22, 2008

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ALSA: Ensure PXA runtime data is initialised

The rest of the code relies on the runtime data being zero initialised so we need to use kzalloc() to allocate it.

---
 sound/arm/pxa2xx-pcm-lib.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/arm/pxa2xx-pcm-lib.c +1 -1
index 1c93eb7..75a0d74 100644
@@ -194,7 +194,7 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream)
 		goto out;
 
 	ret = -ENOMEM;
-	rtd = kmalloc(sizeof(*rtd), GFP_KERNEL);
+	rtd = kzalloc(sizeof(*rtd), GFP_KERNEL);
 	if (!rtd)
 		goto out;
 	rtd->dma_desc_array =
Signature · 1 line
1.5.6.5
#1 lore raw

At Wed, 22 Oct 2008 13:27:49 +0100,

Quoted 6 lines · Mark Brown

The rest of the code relies on the runtime data being zero initialised so we need to use kzalloc() to allocate it.

Applied now. Will put it to the next pull request.

Thanks,

Takashi

Quoted 20 lines
---
 sound/arm/pxa2xx-pcm-lib.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/arm/pxa2xx-pcm-lib.c +1 -1
index 1c93eb7..75a0d74 100644
@@ -194,7 +194,7 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream)
 		goto out;
 
 	ret = -ENOMEM;
-	rtd = kmalloc(sizeof(*rtd), GFP_KERNEL);
+	rtd = kzalloc(sizeof(*rtd), GFP_KERNEL);
 	if (!rtd)
 		goto out;
 	rtd->dma_desc_array =
Signature · 1 line
1.5.6.5