From 3ef76759484832e498cba381aa1b24b90cf36a26 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Tue, 13 Mar 2012 13:50:37 -0300 Subject: [media] dib0700: Drop useless check when remote key is pressed 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 Cc: Mauro Carvalho Chehab Cc: Devin Heitmueller Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/dvb-usb/dib0700_core.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers') diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c index 070e82aa53f..ae4f999930f 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_core.c +++ b/drivers/media/dvb/dvb-usb/dib0700_core.c @@ -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); -- cgit v1.2.3-18-g5258