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

Subject: [media] ivtv: steal could be NULL
Author:  Mauro Carvalho Chehab <[email protected]>
Date:    Mon Feb 22 13:27:20 2016 -0300

ivtv_flush_queues() calls ivtv_queue_move() with steal == NULL.
However, part of the code assumes that steal could be not null, as
pointed by smatch:
        drivers/media/pci/ivtv/ivtv-queue.c:145 ivtv_queue_move() error: we 
previously assumed 'steal' could be null (see line 138)

This has the potential of causing an OOPS when the queue is
flushed.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/pci/ivtv/ivtv-queue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=4c2f7f72b8993c73724790bf2ac33cb788d1ff06
diff --git a/drivers/media/pci/ivtv/ivtv-queue.c 
b/drivers/media/pci/ivtv/ivtv-queue.c
index 7fde36e6d227..2128c2a8d7fd 100644
--- a/drivers/media/pci/ivtv/ivtv-queue.c
+++ b/drivers/media/pci/ivtv/ivtv-queue.c
@@ -141,7 +141,7 @@ int ivtv_queue_move(struct ivtv_stream *s, struct 
ivtv_queue *from, struct ivtv_
                spin_unlock_irqrestore(&s->qlock, flags);
                return -ENOMEM;
        }
-       while (bytes_available < needed_bytes) {
+       while (steal && bytes_available < needed_bytes) {
                struct ivtv_buffer *buf = list_entry(steal->list.prev, struct 
ivtv_buffer, list);
                u16 dma_xfer_cnt = buf->dma_xfer_cnt;
 

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to