[PATCH] V4L/DVB: dib0700: Prevent NULL pointer dereference during probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit 8dc09004978538d211ccc36b5046919489e30a55 assumes that
dev->rc_input_dev is always set. It is, however, NULL if dvb-usb was
loaded with option disable_rc_polling=1.

Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx>
Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
---
 drivers/media/dvb/dvb-usb/dib0700_core.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.36-rc5.orig/drivers/media/dvb/dvb-usb/dib0700_core.c	2010-09-24 17:17:16.000000000 +0200
+++ linux-2.6.36-rc5/drivers/media/dvb/dvb-usb/dib0700_core.c	2010-09-26 15:04:59.000000000 +0200
@@ -674,7 +674,8 @@ static int dib0700_probe(struct usb_inte
 				dev->props.rc.core.bulk_mode = false;
 
 			/* Need a higher delay, to avoid wrong repeat */
-			dev->rc_input_dev->rep[REP_DELAY] = 500;
+			if (dev->rc_input_dev)
+				dev->rc_input_dev->rep[REP_DELAY] = 500;
 
 			dib0700_rc_setup(dev);
 


-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux