aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/cx23885/cx23885-alsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/pci/cx23885/cx23885-alsa.c')
-rw-r--r--drivers/media/pci/cx23885/cx23885-alsa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/pci/cx23885/cx23885-alsa.c b/drivers/media/pci/cx23885/cx23885-alsa.c
index c17e4740d47c..1b162ee8c8c6 100644
--- a/drivers/media/pci/cx23885/cx23885-alsa.c
+++ b/drivers/media/pci/cx23885/cx23885-alsa.c
@@ -389,6 +389,7 @@ static int snd_cx23885_hw_params(struct snd_pcm_substream *substream,
389 return -ENOMEM; 389 return -ENOMEM;
390 390
391 buf->bpl = chip->period_size; 391 buf->bpl = chip->period_size;
392 chip->buf = buf;
392 393
393 ret = cx23885_alsa_dma_init(chip, 394 ret = cx23885_alsa_dma_init(chip,
394 (PAGE_ALIGN(chip->dma_size) >> PAGE_SHIFT)); 395 (PAGE_ALIGN(chip->dma_size) >> PAGE_SHIFT));
@@ -409,8 +410,6 @@ static int snd_cx23885_hw_params(struct snd_pcm_substream *substream,
409 buf->risc.jmp[1] = cpu_to_le32(buf->risc.dma); 410 buf->risc.jmp[1] = cpu_to_le32(buf->risc.dma);
410 buf->risc.jmp[2] = cpu_to_le32(0); /* bits 63-32 */ 411 buf->risc.jmp[2] = cpu_to_le32(0); /* bits 63-32 */
411 412
412 chip->buf = buf;
413
414 substream->runtime->dma_area = chip->buf->vaddr; 413 substream->runtime->dma_area = chip->buf->vaddr;
415 substream->runtime->dma_bytes = chip->dma_size; 414 substream->runtime->dma_bytes = chip->dma_size;
416 substream->runtime->dma_addr = 0; 415 substream->runtime->dma_addr = 0;
@@ -419,6 +418,7 @@ static int snd_cx23885_hw_params(struct snd_pcm_substream *substream,
419 418
420error: 419error:
421 kfree(buf); 420 kfree(buf);
421 chip->buf = NULL;
422 return ret; 422 return ret;
423} 423}
424 424