diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2011-08-04 04:14:12 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-08-31 17:21:08 -0300 |
commit | 88e834a841bde22b4c0aa71809e02c118c5b219d (patch) | |
tree | d54c6733024e04bd479e8310858410c2ac3ab815 /drivers/staging | |
parent | 6f2e77bb955771a7b8de80ea519c1e9a82b864dd (diff) | |
download | linux-88e834a841bde22b4c0aa71809e02c118c5b219d.tar.gz linux-88e834a841bde22b4c0aa71809e02c118c5b219d.tar.bz2 linux-88e834a841bde22b4c0aa71809e02c118c5b219d.zip |
[media] tm6000: Initialize isochronous transfers only once
This fixes a memory leak where isochronous buffers would be set up for
each video buffer, while it is sufficient to set them up only once per
device.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/tm6000/tm6000-video.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index bef6023424af..873c8ee8b3ba 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -754,7 +754,7 @@ buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, struct tm6000_fh *fh = vq->priv_data; struct tm6000_buffer *buf = container_of(vb, struct tm6000_buffer, vb); struct tm6000_core *dev = fh->dev; - int rc = 0, urb_init = 0; + int rc = 0; BUG_ON(NULL == fh->fmt); @@ -780,13 +780,9 @@ buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, rc = videobuf_iolock(vq, &buf->vb, NULL); if (rc != 0) goto fail; - urb_init = 1; } - if (!dev->isoc_ctl.num_bufs) - urb_init = 1; - - if (urb_init) { + if (!dev->isoc_ctl.num_bufs) { rc = tm6000_prepare_isoc(dev); if (rc < 0) goto fail; |