[ALSA] Conversions from kmalloc+memset to k(z|c)alloc
sound: Conversions from kmalloc+memset to k(c|z)alloc. Signed-off-by: Panagiotis Issaris <takis@issaris.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This commit is contained in:

committed by
Jaroslav Kysela

parent
fb6a0d635d
commit
59feddb25f
@@ -236,9 +236,9 @@ static int pcm_open(struct snd_pcm_substream *substream,
|
||||
chip = snd_pcm_substream_chip(substream);
|
||||
runtime = substream->runtime;
|
||||
|
||||
if (!(pipe = kmalloc(sizeof(struct audiopipe), GFP_KERNEL)))
|
||||
pipe = kzalloc(sizeof(struct audiopipe), GFP_KERNEL);
|
||||
if (!pipe)
|
||||
return -ENOMEM;
|
||||
memset(pipe, 0, sizeof(struct audiopipe));
|
||||
pipe->index = -1; /* Not configured yet */
|
||||
|
||||
/* Set up hw capabilities and contraints */
|
||||
|
Reference in New Issue
Block a user