linux-stable/drivers/media
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
..
common [media] tuner-xc2028: unlock on error in xc2028_get_afc() 2012-07-30 20:37:19 -03:00
dvb [media] az6007: fix incorrect memcpy 2012-07-30 21:04:58 -03:00
radio [media] radio-si470x: Add support for the new band APIs 2012-07-30 20:23:14 -03:00
rc [media] Avoid sysfs oops when an rc_dev's raw device is absent 2012-07-30 21:15:32 -03:00
video [media] v4l2-dev.c: Move video_put() after debug printk 2012-07-30 21:11:35 -03:00
Kconfig [media] Kconfig: Split the core support options from the driver ones 2012-07-06 09:12:59 -03:00
Makefile
media-device.c
media-devnode.c Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
media-entity.c [media] media: Add link_validate() op to check links to the sink pad 2012-05-14 08:44:11 -03:00