All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] [media] dib0700: Drop useless check when remote key is pressed
@ 2012-03-13 17:50 Jean Delvare
  2012-03-13 17:57 ` Devin Heitmueller
  0 siblings, 1 reply; 6+ messages in thread
From: Jean Delvare @ 2012-03-13 17:50 UTC (permalink / raw)
  To: LMML; +Cc: Mauro Carvalho Chehab, Devin Heitmueller

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-03-21 20:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-13 17:50 [PATCH 1/2] [media] dib0700: Drop useless check when remote key is pressed Jean Delvare
2012-03-13 17:57 ` Devin Heitmueller
2012-03-19 22:26   ` Mauro Carvalho Chehab
2012-03-20  7:20     ` Jean Delvare
2012-03-20 12:17       ` Mauro Carvalho Chehab
2012-03-21 20:09         ` Jean Delvare

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.