[media] dib0700: Drop useless check when remote key is pressed
authorJean Delvare <[email protected]>
Tue, 13 Mar 2012 16:50:37 +0000 (13:50 -0300)
committerMauro Carvalho Chehab <[email protected]>
Mon, 19 Mar 2012 22:17:58 +0000 (19:17 -0300)
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 <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Devin Heitmueller <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
drivers/media/dvb/dvb-usb/dib0700_core.c

index 070e82aa53f53248f33448d9e61d22b484e6b28a..ae4f999930fa56ec3007da9dc5c0ed4edc7b9221 100644 (file)
@@ -677,9 +677,6 @@ static void dib0700_rc_urb_completion(struct urb *purb)
        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);