aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/s2255drv.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-04-13 17:29:07 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-04-13 17:29:07 -0400
commitf499cae1e59d75d5eb24c23d47cf8986e6032c6d (patch)
tree1af6235c18391212c40116eb90b01eae8938efee /drivers/media/video/s2255drv.c
parentfc3f55e672e1ed917dd9e215af81939cd3d717da (diff)
parent80a04d3f2f94fb68b5df05e3ac6697130bc3467a (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/media/video/s2255drv.c')
-rw-r--r--drivers/media/video/s2255drv.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c
index b5be633e3bb0..5202cadb2aae 100644
--- a/drivers/media/video/s2255drv.c
+++ b/drivers/media/video/s2255drv.c
@@ -722,7 +722,6 @@ static void free_buffer(struct videobuf_queue *vq, struct s2255_buffer *buf)
722{ 722{
723 dprintk(4, "%s\n", __func__); 723 dprintk(4, "%s\n", __func__);
724 724
725 videobuf_waiton(&buf->vb, 0, 0);
726 videobuf_vmalloc_free(&buf->vb); 725 videobuf_vmalloc_free(&buf->vb);
727 buf->vb.state = VIDEOBUF_NEEDS_INIT; 726 buf->vb.state = VIDEOBUF_NEEDS_INIT;
728} 727}
@@ -1324,7 +1323,6 @@ static int vidioc_streamon(struct file *file, void *priv, enum v4l2_buf_type i)
1324 1323
1325static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i) 1324static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i)
1326{ 1325{
1327 int res;
1328 struct s2255_fh *fh = priv; 1326 struct s2255_fh *fh = priv;
1329 struct s2255_dev *dev = fh->dev; 1327 struct s2255_dev *dev = fh->dev;
1330 1328
@@ -1338,9 +1336,7 @@ static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i)
1338 return -EINVAL; 1336 return -EINVAL;
1339 } 1337 }
1340 s2255_stop_acquire(dev, fh->channel); 1338 s2255_stop_acquire(dev, fh->channel);
1341 res = videobuf_streamoff(&fh->vb_vidq); 1339 videobuf_streamoff(&fh->vb_vidq);
1342 if (res < 0)
1343 return res;
1344 res_free(dev, fh); 1340 res_free(dev, fh);
1345 return 0; 1341 return 0;
1346} 1342}
@@ -1707,13 +1703,13 @@ static void s2255_destroy(struct kref *kref)
1707 kfree(dev->fw_data); 1703 kfree(dev->fw_data);
1708 usb_put_dev(dev->udev); 1704 usb_put_dev(dev->udev);
1709 dprintk(1, "%s", __func__); 1705 dprintk(1, "%s", __func__);
1710 kfree(dev);
1711 1706
1712 while (!list_empty(&s2255_devlist)) { 1707 while (!list_empty(&s2255_devlist)) {
1713 list = s2255_devlist.next; 1708 list = s2255_devlist.next;
1714 list_del(list); 1709 list_del(list);
1715 } 1710 }
1716 mutex_unlock(&dev->open_lock); 1711 mutex_unlock(&dev->open_lock);
1712 kfree(dev);
1717} 1713}
1718 1714
1719static int s2255_close(struct file *file) 1715static int s2255_close(struct file *file)