summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2005-02-24 13:32:30 +0000
committerGerd Knorr <devnull@localhost>2005-02-24 13:32:30 +0000
commit94d904768c35752857972b3ca978203e5ae81ea1 (patch)
tree2804e9289129fe514ca6c2ba11c1f8758e981631 /linux/drivers/media
parent5486b447bfcedd4e154782e0e8045bdbf9cefc42 (diff)
downloadmediapointer-dvb-s2-94d904768c35752857972b3ca978203e5ae81ea1.tar.gz
mediapointer-dvb-s2-94d904768c35752857972b3ca978203e5ae81ea1.tar.bz2
- catch pci_map_sg failure.
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c3
-rw-r--r--linux/drivers/media/video/video-buf.c13
2 files changed, 12 insertions, 4 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index f115d8564..91d4d9ce7 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-video.c,v 1.56 2005/02/15 10:51:54 kraxel Exp $
+ * $Id: cx88-video.c,v 1.57 2005/02/24 13:32:30 kraxel Exp $
*
* device driver for Conexant 2388x based TV cards
* video4linux video interface
@@ -1348,7 +1348,6 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
0;
if (UNSET != core->tuner_type)
cap->capabilities |= V4L2_CAP_TUNER;
-
return 0;
}
diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c
index 58352a563..6684dbc54 100644
--- a/linux/drivers/media/video/video-buf.c
+++ b/linux/drivers/media/video/video-buf.c
@@ -1,5 +1,5 @@
/*
- * $Id: video-buf.c,v 1.17 2004/12/10 12:33:40 kraxel Exp $
+ * $Id: video-buf.c,v 1.18 2005/02/24 13:32:30 kraxel Exp $
*
* generic helper functions for video4linux capture buffers, to handle
* memory management and PCI DMA. Right now bttv + saa7134 use it.
@@ -222,9 +222,18 @@ int videobuf_dma_pci_map(struct pci_dev *dev, struct videobuf_dmabuf *dma)
return -ENOMEM;
}
- if (!dma->bus_addr)
+ if (!dma->bus_addr) {
dma->sglen = pci_map_sg(dev,dma->sglist,dma->nr_pages,
dma->direction);
+ if (0 == dma->sglen) {
+ printk(KERN_WARNING
+ "%s: pci_map_sg failed\n",__FUNCTION__);
+ kfree(dma->sglist);
+ dma->sglist = NULL;
+ dma->sglen = 0;
+ return -EIO;
+ }
+ }
return 0;
}