mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
media: cx88: Add missing unmap in snd_cx88_hw_params()
In error path, add cx88_alsa_dma_unmap() to release
resource acquired by cx88_alsa_dma_map().
Fixes: b2c75abde0 ("[media] cx88: drop videobuf abuse in cx88-alsa")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
b8bf939d77
commit
dbc527d980
|
|
@ -483,8 +483,10 @@ static int snd_cx88_hw_params(struct snd_pcm_substream *substream,
|
|||
|
||||
ret = cx88_risc_databuffer(chip->pci, &buf->risc, buf->sglist,
|
||||
chip->period_size, chip->num_periods, 1);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
cx88_alsa_dma_unmap(chip);
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Loop back to start of program */
|
||||
buf->risc.jmp[0] = cpu_to_le32(RISC_JUMP | RISC_IRQ1 | RISC_CNT_INC);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user