Skip to content

Commit

Permalink
[media] dib0700: Drop useless check when remote key is pressed
Browse files Browse the repository at this point in the history
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 <khali@linux-fr.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Jean Delvare authored and Mauro Carvalho Chehab committed Mar 19, 2012
1 parent 401a582 commit 3ef7675
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/media/dvb/dvb-usb/dib0700_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3ef7675

Please sign in to comment.