Skip to content
/ linux Public

Commit 9544b73

Browse files
Haoxiang LiSasha Levin
authored andcommitted
media: cx23885: Add missing unmap in snd_cx23885_hw_params()
[ Upstream commit 141c818 ] In error path, add cx23885_alsa_dma_unmap() to release the resource acquired by cx23885_alsa_dma_map(). Fixes: 9529a4b ("[media] cx23885: drop videobuf abuse in cx23885-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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 1ce8c2a commit 9544b73

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/media/pci/cx23885/cx23885-alsa.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,10 @@ static int snd_cx23885_hw_params(struct snd_pcm_substream *substream,
392392

393393
ret = cx23885_risc_databuffer(chip->pci, &buf->risc, buf->sglist,
394394
chip->period_size, chip->num_periods, 1);
395-
if (ret < 0)
395+
if (ret < 0) {
396+
cx23885_alsa_dma_unmap(chip);
396397
goto error;
398+
}
397399

398400
/* Loop back to start of program */
399401
buf->risc.jmp[0] = cpu_to_le32(RISC_JUMP|RISC_IRQ1|RISC_CNT_INC);

0 commit comments

Comments
 (0)