]> err.no Git - linux-2.6/blobdiff - sound/core/pcm.c
Merge with http://kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
[linux-2.6] / sound / core / pcm.c
index 9f4c9209b2717a0ff23b938402e9fb5132efeaeb..184e74b75ba96f78c523d3464960c42cf09396b9 100644 (file)
@@ -273,7 +273,8 @@ static void snd_pcm_proc_info_read(snd_pcm_substream_t *substream, snd_info_buff
        snd_pcm_info_t *info;
        int err;
 
-       snd_runtime_check(substream, return);
+       if (! substream)
+               return;
 
        info = kmalloc(sizeof(*info), GFP_KERNEL);
        if (! info) {
@@ -597,7 +598,7 @@ int snd_pcm_new_stream(snd_pcm_t *pcm, int stream, int substream_count)
        }
        prev = NULL;
        for (idx = 0, prev = NULL; idx < substream_count; idx++) {
-               substream = kcalloc(1, sizeof(*substream), GFP_KERNEL);
+               substream = kzalloc(sizeof(*substream), GFP_KERNEL);
                if (substream == NULL)
                        return -ENOMEM;
                substream->pcm = pcm;
@@ -657,7 +658,7 @@ int snd_pcm_new(snd_card_t * card, char *id, int device,
        snd_assert(rpcm != NULL, return -EINVAL);
        *rpcm = NULL;
        snd_assert(card != NULL, return -ENXIO);
-       pcm = kcalloc(1, sizeof(*pcm), GFP_KERNEL);
+       pcm = kzalloc(sizeof(*pcm), GFP_KERNEL);
        if (pcm == NULL)
                return -ENOMEM;
        pcm->card = card;
@@ -795,7 +796,7 @@ int snd_pcm_open_substream(snd_pcm_t *pcm, int stream,
        if (substream == NULL)
                return -EAGAIN;
 
-       runtime = kcalloc(1, sizeof(*runtime), GFP_KERNEL);
+       runtime = kzalloc(sizeof(*runtime), GFP_KERNEL);
        if (runtime == NULL)
                return -ENOMEM;