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. --- 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 4b50f6c..492ec73 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -758,7 +758,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); @@ -784,13 +784,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; -- 1.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html