diff options
| author | Ingo Molnar <[email protected]> | 2009-03-23 16:53:20 +0100 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2009-03-23 16:53:20 +0100 |
| commit | efd247fa34084d9b162f485004ae6d8a04059f0c (patch) | |
| tree | 417dcbe06d5cce1353a4c19cbda480ae67652b5c /sound/core/sgbuf.c | |
| parent | af66df5ecf9c9e2d2ff86e8203510c1c4519d64c (diff) | |
| parent | 59fcbddaff6f862cc1584b488866d9c4a5579085 (diff) | |
Merge branches 'sched/debug' and 'linus' into sched/core
Diffstat (limited to 'sound/core/sgbuf.c')
| -rw-r--r-- | sound/core/sgbuf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/core/sgbuf.c b/sound/core/sgbuf.c index d4564edd61d7..4e7ec2b49873 100644 --- a/sound/core/sgbuf.c +++ b/sound/core/sgbuf.c @@ -38,6 +38,10 @@ int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab) if (! sgbuf) return -EINVAL; + if (dmab->area) + vunmap(dmab->area); + dmab->area = NULL; + tmpb.dev.type = SNDRV_DMA_TYPE_DEV; tmpb.dev.dev = sgbuf->dev; for (i = 0; i < sgbuf->pages; i++) { @@ -48,9 +52,6 @@ int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab) tmpb.bytes = (sgbuf->table[i].addr & ~PAGE_MASK) << PAGE_SHIFT; snd_dma_free_pages(&tmpb); } - if (dmab->area) - vunmap(dmab->area); - dmab->area = NULL; kfree(sgbuf->table); kfree(sgbuf->page_table); |