diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-08 12:59:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-08 12:59:52 -0400 |
commit | 6666cabf5af309c1c3e63a36e2580879fb40e827 (patch) | |
tree | b2d095042e5a8e71841162d4f0e2e4dd200b9ad5 /sound/pci/emu10k1/memory.c | |
parent | 42a579a0f960081cd16fc945036e4780c3ad3202 (diff) | |
parent | 012e7eb1e501d0120e0383b81477f63091f5e365 (diff) |
Merge tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Containing only a few really small/trivial fixes. The only urgent fix
is a regression fix of HDMI codec probing, introduced in 3.6-rc1. The
rest are HD-audio specific fixes and a copule of minor bug fixes in
PCM core and the old emu10k1."
* tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad
ALSA: hda - Fix ugly debug prints with CONFIG_SND_VERBOSE_PRINTK=y
ALSA: hda - remove redundant auto quirks for conexant 506x
ALSA: hda - remove quirk for Dell Vostro 1015
ALSA: hda - add dock support for Thinkpad X230
ALSA: hda - Fix regression of HDMI codec probing
ALSA: hda - add dock support for Thinkpad T430s
ALSA: emu10k1: Avoid access to invalid pages when period=1
ALSA: PCM: Fix possible memory leaks in the error path
Diffstat (limited to 'sound/pci/emu10k1/memory.c')
-rw-r--r-- | sound/pci/emu10k1/memory.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c index 4f502a2bdc3c..0a436626182b 100644 --- a/sound/pci/emu10k1/memory.c +++ b/sound/pci/emu10k1/memory.c | |||
@@ -326,7 +326,10 @@ snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *subst | |||
326 | for (page = blk->first_page; page <= blk->last_page; page++, idx++) { | 326 | for (page = blk->first_page; page <= blk->last_page; page++, idx++) { |
327 | unsigned long ofs = idx << PAGE_SHIFT; | 327 | unsigned long ofs = idx << PAGE_SHIFT; |
328 | dma_addr_t addr; | 328 | dma_addr_t addr; |
329 | addr = snd_pcm_sgbuf_get_addr(substream, ofs); | 329 | if (ofs >= runtime->dma_bytes) |
330 | addr = emu->silent_page.addr; | ||
331 | else | ||
332 | addr = snd_pcm_sgbuf_get_addr(substream, ofs); | ||
330 | if (! is_valid_page(emu, addr)) { | 333 | if (! is_valid_page(emu, addr)) { |
331 | printk(KERN_ERR "emu: failure page = %d\n", idx); | 334 | printk(KERN_ERR "emu: failure page = %d\n", idx); |
332 | mutex_unlock(&hdr->block_mutex); | 335 | mutex_unlock(&hdr->block_mutex); |