This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media_tree.git tree:

Subject: [media] tm6000: fix an uninitialized variable
Author:  Hans Verkuil <hverk...@xs4all.nl>
Date:    Thu Feb 7 07:05:43 2013 -0300

tm6000_poll could use an uninitialized buf pointer. Move the buf-handling
code inside the 'if' that initializes the buf pointer.

Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
Reported-by: Dan Carpenter <dan.carpen...@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mche...@redhat.com>

 drivers/media/usb/tm6000/tm6000-video.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=82f0efbcd3c4e6bf7cdfeed5c901b812e6d30f92

diff --git a/drivers/media/usb/tm6000/tm6000-video.c 
b/drivers/media/usb/tm6000/tm6000-video.c
index eab2341..1a68579 100644
--- a/drivers/media/usb/tm6000/tm6000-video.c
+++ b/drivers/media/usb/tm6000/tm6000-video.c
@@ -1455,14 +1455,14 @@ __tm6000_poll(struct file *file, struct 
poll_table_struct *wait)
                if (list_empty(&fh->vb_vidq.stream))
                        return res | POLLERR;
                buf = list_entry(fh->vb_vidq.stream.next, struct tm6000_buffer, 
vb.stream);
+               poll_wait(file, &buf->vb.done, wait);
+               if (buf->vb.state == VIDEOBUF_DONE ||
+                   buf->vb.state == VIDEOBUF_ERROR)
+                       return res | POLLIN | POLLRDNORM;
        } else if (req_events & (POLLIN | POLLRDNORM)) {
                /* read() capture */
                return res | videobuf_poll_stream(file, &fh->vb_vidq, wait);
        }
-       poll_wait(file, &buf->vb.done, wait);
-       if (buf->vb.state == VIDEOBUF_DONE ||
-           buf->vb.state == VIDEOBUF_ERROR)
-               return res | POLLIN | POLLRDNORM;
        return res;
 }
 

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to