]> err.no Git - linux-2.6/blobdiff - sound/pci/echoaudio/echoaudio.c
[ALSA] Conversions from kmalloc+memset to k(z|c)alloc
[linux-2.6] / sound / pci / echoaudio / echoaudio.c
index 27a8dbe6f6a8ad9aadf564b40a2b6c368c7f5bc4..c3dafa29054f96c618c1c824830ec06623c47014 100644 (file)
@@ -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 */