linux/drivers/media/rc
Douglas Bagnall 720bb6436f [media] Avoid sysfs oops when an rc_dev's raw device is absent
For some reason, when the lirc daemon learns that a usb remote control
has been unplugged, it wants to read the sysfs attributes of the
disappearing device. This is useful for uncovering transient
inconsistencies, but less so for keeping the system running when such
inconsistencies exist.

Under some circumstances (like every time I unplug my dvb stick from
my laptop), lirc catches an rc_dev whose raw event handler has been
removed (presumably by ir_raw_event_unregister), and proceeds to
interrogate the raw protocols supported by the NULL pointer.

This patch avoids the NULL dereference, and ignores the issue of how
this state of affairs came about in the first place.

Version 2 incorporates changes recommended by Mauro Carvalho Chehab
(-ENODEV instead of -EINVAL, and a signed-off-by).

Signed-off-by: Douglas Bagnall <douglas@paradise.net.nz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-07-30 21:15:32 -03:00
..
keymaps [media] patch for Asus My Cinema PS3-100 (1043:48cd) 2012-05-20 16:05:02 -03:00
ati_remote.c [media] ati_remote: add keymap for Medion X10 OR2x remotes 2012-05-20 11:40:06 -03:00
ene_ir.c [media] ene_ir: Fix driver initialisation 2012-07-05 11:14:21 -03:00
ene_ir.h treewide: Fix comment and string typo 'bufer' 2011-12-06 09:53:40 +01:00
fintek-cir.c [media] media: Use pr_info not homegrown pr_reg macro 2012-07-06 20:41:12 -03:00
fintek-cir.h [media] fintek-cir: add support for newer chip version 2012-02-14 16:53:53 -02:00
gpio-ir-recv.c [media] media: gpio-ir-recv: add allowed_protos for platform data 2012-07-06 18:21:53 -03:00
imon.c [media] drivers/media: add missing __devexit_p() annotations 2012-05-15 07:53:51 -03:00
ir-jvc-decoder.c drivers/media: Add module.h to all files using it implicitly 2011-10-31 19:31:51 -04:00
ir-lirc-codec.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
ir-mce_kbd-decoder.c [media] ir-mce_kbd-decoder: include module.h for its facilities 2011-07-29 12:54:38 -03:00
ir-nec-decoder.c Merge tag 'v3.2-rc2' into staging/for_v3.3 2011-11-23 19:42:09 -02:00
ir-raw.c [media] [3.3.0] ir-raw: remove BUG_ON in ir_raw_event_thread 2012-04-10 15:41:21 -03:00
ir-rc5-decoder.c drivers/media: Add module.h to all files using it implicitly 2011-10-31 19:31:51 -04:00
ir-rc5-sz-decoder.c drivers/media: Add module.h to all files using it implicitly 2011-10-31 19:31:51 -04:00
ir-rc6-decoder.c [media] ir-rc6-decoder: Support RC6-6A variable length data 2011-11-23 22:23:15 -02:00
ir-sanyo-decoder.c [media] v4l/dvb: fix compiler warnings 2012-05-14 14:50:51 -03:00
ir-sony-decoder.c [media] media: ir-sony-decoder: 15bit function decode fix 2012-03-08 11:16:21 -03:00
ite-cir.c [media] rc: Fix invalid free_region and/or free_irq on probe failure 2012-05-20 11:43:05 -03:00
ite-cir.h [media] ite-cir: 8709 needs to use pnp resource 2 2011-07-01 16:31:38 -03:00
Kconfig [media] rc/Kconfig: Move a LIRC sub-option to the right place 2012-07-06 09:21:13 -03:00
lirc_dev.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
Makefile [media] rc: Add support for GPIO based IR Receiver driver 2012-03-08 11:14:10 -03:00
mceusb.c [media] drivers/media: add missing __devexit_p() annotations 2012-05-15 07:53:51 -03:00
nuvoton-cir.c [media] media: Use pr_info not homegrown pr_reg macro 2012-07-06 20:41:12 -03:00
nuvoton-cir.h [media] nuvoton-cir: simplify raw IR sample handling 2011-09-11 09:33:40 -03:00
rc-core-priv.h [media] rc/ir-raw: use kfifo_rec_ptr_1 instead of kfifo 2012-03-08 10:39:53 -03:00
rc-loopback.c [media] rc-loopback: remove duplicate line 2012-05-20 16:06:06 -03:00
rc-main.c [media] Avoid sysfs oops when an rc_dev's raw device is absent 2012-07-30 21:15:32 -03:00
redrat3.c [media] drivers/media: add missing __devexit_p() annotations 2012-05-15 07:53:51 -03:00
streamzap.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
winbond-cir.c [media] winbond-cir: Initialise timeout, driver_type and allowed_protos 2012-07-06 19:36:38 -03:00