Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132440
b: refs/heads/master
c: 6af845e
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Mar 18, 2009
1 parent 2e1a264 commit 6987ac9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 82f5d57163abed2e5ff271d03217b6f90c616eb8
refs/heads/master: 6af845e4eb36fb91b322aaf77ec1cab2220a48ad
7 changes: 4 additions & 3 deletions trunk/sound/core/sgbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand All @@ -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);
Expand Down

0 comments on commit 6987ac9

Please sign in to comment.