struct dvb_usb_device *d can never be NULL so don't waste time
checking for this.

Rationale: the urb's context is set when usb_fill_bulk_urb() is called
in dib0700_rc_setup(), and never changes after that. d is dereferenced
unconditionally in dib0700_rc_setup() so it can't be NULL or the
driver would crash right away.

Signed-off-by: Jean Delvare <kh...@linux-fr.org>
Cc: Mauro Carvalho Chehab <mche...@infradead.org>
Cc: Devin Heitmueller <dheitmuel...@kernellabs.com>
---
Devin, am I missing something?

 drivers/media/dvb/dvb-usb/dib0700_core.c |    3 ---
 1 file changed, 3 deletions(-)

--- linux-3.3-rc7.orig/drivers/media/dvb/dvb-usb/dib0700_core.c 2012-03-13 
11:09:13.000000000 +0100
+++ linux-3.3-rc7/drivers/media/dvb/dvb-usb/dib0700_core.c      2012-03-13 
18:37:05.785953845 +0100
@@ -677,9 +677,6 @@ static void dib0700_rc_urb_completion(st
        u8 toggle;
 
        deb_info("%s()\n", __func__);
-       if (d == NULL)
-               return;
-
        if (d->rc_dev == NULL) {
                /* This will occur if disable_rc_polling=1 */
                usb_free_urb(purb);


-- 
Jean Delvare
--
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

Reply via email to