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] pvrusb2-io: no need to check if sp is not NULL
Author:  Mauro Carvalho Chehab <[email protected]>
Date:    Mon Feb 22 13:02:36 2016 -0300

The buffer_complete() routine assumes that sp is not NULL,
otherwise it will fail completely. Btw, this is also
assumed at pvr2_buffer_queue(), with is the routine that
setups the URB handling.

So, remove the bogus for the callback at buffer_complete.

This fix this smatch warning:
        drivers/media/usb/pvrusb2/pvrusb2-io.c:476 buffer_complete() warn: 
variable dereferenced before check 'sp' (see line 472)

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

 drivers/media/usb/pvrusb2/pvrusb2-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---

http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=19409c8969380ec42e07e5ac2d29d4a33bea572d
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-io.c 
b/drivers/media/usb/pvrusb2/pvrusb2-io.c
index d860344de84e..e68ce24f27e3 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-io.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-io.c
@@ -473,7 +473,7 @@ static void buffer_complete(struct urb *urb)
        }
        spin_unlock_irqrestore(&sp->list_lock,irq_flags);
        pvr2_buffer_set_ready(bp);
-       if (sp && sp->callback_func) {
+       if (sp->callback_func) {
                sp->callback_func(sp->callback_data);
        }
 }

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

Reply via email to