summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/cx88/cx88-mpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/pci/cx88/cx88-mpeg.c')
-rw-r--r--drivers/media/pci/cx88/cx88-mpeg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/pci/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c
index 7986ee037b83..0589dccae3bd 100644
--- a/drivers/media/pci/cx88/cx88-mpeg.c
+++ b/drivers/media/pci/cx88/cx88-mpeg.c
@@ -238,8 +238,12 @@ int cx8802_buf_prepare(struct vb2_queue *q, struct cx8802_dev *dev,
if (!rc)
return -EIO;
- cx88_risc_databuffer(dev->pci, &buf->risc, sgt->sgl,
+ rc = cx88_risc_databuffer(dev->pci, &buf->risc, sgt->sgl,
dev->ts_packet_size, dev->ts_packet_count, 0);
+ if (rc) {
+ btcx_riscmem_free(dev->pci, &buf->risc);
+ return rc;
+ }
return 0;
}