소스 검색

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.

Reported-by: Oliver Ford <ipaqlinux@oliford.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mark Brown 16 년 전
부모
커밋
13095c37b2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      sound/arm/pxa2xx-pcm-lib.c

+ 1 - 1
sound/arm/pxa2xx-pcm-lib.c

@@ -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 =