X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fpcmcia%2Fpdaudiocf%2Fpdaudiocf_pcm.c;h=962e6d525564a038d9c420ed77e2d565ba65b4f0;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=7f2a4de1d35d5b2405f8ce5693ed6d6d18cab57a;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c index 7f2a4de1d..962e6d525 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c @@ -66,9 +66,10 @@ static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t s static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs) { struct snd_pcm_runtime *runtime = subs->runtime; - - vfree(runtime->dma_area); - runtime->dma_area = NULL; + if (runtime->dma_area) { + vfree(runtime->dma_area); + runtime->dma_area = NULL; + } return 0; }