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] tm6000: remove needless check
Author:  Mauro Carvalho Chehab <[email protected]>
Date:    Fri Jun 5 09:33:44 2015 -0300

Smatch reports a warning:
        drivers/media/usb/tm6000/tm6000-video.c:646 tm6000_prepare_isoc() 
error: we previously assumed 'dev->urb_buffer' could be null (see line 624)

This is not really a problem, but it actually shows that the check
if urb_buffer is NULL is being done twice: at the if and at
tm6000_alloc_urb_buffers().

We don't need to do it twice. So, remove the extra check. The code
become cleaner, and, as a collateral effect, smatch becomes happy.

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

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

---

http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=485bdbb6b83309505654379153d55746d5996917

diff --git a/drivers/media/usb/tm6000/tm6000-video.c 
b/drivers/media/usb/tm6000/tm6000-video.c
index 77ce9ef..5287d29 100644
--- a/drivers/media/usb/tm6000/tm6000-video.c
+++ b/drivers/media/usb/tm6000/tm6000-video.c
@@ -621,7 +621,7 @@ static int tm6000_prepare_isoc(struct tm6000_core *dev)
                    dev->isoc_in.maxsize, size);
 
 
-       if (!dev->urb_buffer && tm6000_alloc_urb_buffers(dev) < 0) {
+       if (tm6000_alloc_urb_buffers(dev) < 0) {
                tm6000_err("cannot allocate memory for urb buffers\n");
 
                /* call free, as some buffers might have been allocated */

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

Reply via email to