alistair23-linux/drivers
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
..
accessibility
acpi Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-05-05 10:06:06 -07:00
amba ARM: 7366/3: amba: Remove AMBA level regulator support 2012-04-13 14:04:08 +01:00
ata Change summary: 2012-05-03 17:16:52 -07:00
atm
auxdisplay
base regmap: fix possible memory corruption in regmap_bulk_read() 2012-05-09 15:44:11 +01:00
bcma bcma: use fallback sprom if no on chip sprom is available 2012-04-16 13:32:01 -04:00
block connector/userns: replace netlink uses of cap_raised() with capable() 2012-05-10 23:21:39 -04:00
bluetooth Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth 2012-04-27 15:16:43 -04:00
cdrom
char tty and serial fixes for 3.4-rc2 2012-04-12 15:36:33 -07:00
clk
clocksource Revert "clocksource: Load the ACPI PM clocksource asynchronously" 2012-04-12 00:05:05 +02:00
connector
cpufreq cpufreq: OMAP: fix build errors: depends on ARCH_OMAP2PLUS 2012-04-13 17:57:40 -07:00
cpuidle
crypto
dca
devfreq
dio
dma Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma 2012-04-26 15:33:36 -07:00
edac
eisa
firewire
firmware efivars: Improve variable validation 2012-05-03 17:19:19 -07:00
gpio gpio/exynos: Fix compiler warnings when non-exynos machines are selected 2012-05-11 18:25:53 -06:00
gpu drm/nouveau/i2c: resume use of i2c-algo-bit, rather than custom stack 2012-05-07 11:02:38 +01:00
hid [media] radio-shark: New driver for the Griffin radioSHARK USB radio receiver 2012-07-30 18:00:32 -03:00
hsi HSI: hsi_char: Remove max_data_size from sysfs 2012-04-23 14:23:32 +03:00
hv
hwmon hwmon: (coretemp) Increase CPU core limit 2012-05-01 09:16:14 -07:00
hwspinlock
i2c [media] i2c: Export an unlocked flavor of i2c_transfer 2012-06-29 19:03:25 -03:00
ide
idle
ieee802154
infiniband A few fixes for regressions introduced in 3.4-rc1: 2012-04-26 15:35:35 -07:00
input Merge remote-tracking branch 'linus/master' into staging/for_v3.5 2012-05-15 08:39:25 -03:00
iommu
isdn tty and serial fixes for 3.4-rc2 2012-04-12 15:36:33 -07:00
leds drivers/leds: correct __devexit annotations 2012-05-10 15:06:44 -07:00
lguest
macintosh
mca
md Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-12 12:57:01 -07:00
media [media] Avoid sysfs oops when an rc_dev's raw device is absent 2012-07-30 21:15:32 -03:00
memstick
message
mfd mfd: Fix build breakage in omap-usb-host.c 2012-05-01 11:55:04 +02:00
misc
mmc Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma 2012-04-26 15:33:36 -07:00
mtd Three fixes for 3.4: 2012-05-13 11:33:09 -07:00
net bonding: Fix LACPDU rx_dropped commit. 2012-05-13 15:45:13 -04:00
nfc
nubus
of gpio: Fix range check in of_gpio_simple_xlate() 2012-04-10 14:20:56 -06:00
oprofile
parisc parisc: move definition of PAGE0 to asm/page.h 2012-05-10 15:12:08 -07:00
parport
pci Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-05-05 10:06:06 -07:00
pcmcia
pinctrl pinctrl: implement pinctrl_check_ops 2012-04-11 09:31:02 +02:00
platform Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-05-06 12:19:38 -07:00
pnp
power
pps
ps3
ptp
rapidio
regulator regulator: Actually free the regulator in devm_regulator_put() 2012-05-07 13:14:44 +01:00
remoteproc
rpmsg
rtc Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-05-04 15:35:09 -07:00
s390 qeth: Use blkt defaults for OSA Express 4 2012-04-24 00:33:17 -04:00
sbus
scsi [SCSI] virtio_scsi: fix TMF use-after-free 2012-05-10 08:27:06 +01:00
sfi
sh
sn
spi spi/spi-bfin5xx: Fix flush of last bit after each spi transfer 2012-04-27 12:20:39 -06:00
ssb
staging [media] drivers/staging/media/easycap/easycap_main.c: add missing usb_free_urb 2012-07-30 21:05:45 -03:00
target target: Drop incorrect se_lun_acl release for dynamic -> explict ACL conversion 2012-05-11 14:55:19 -07:00
tc
thermal
tty tty: Fix LED error return 2012-05-14 10:43:24 -07:00
uio
usb Merge remote-tracking branch 'linus/master' into staging/for_v3.5 2012-05-15 08:39:25 -03:00
uwb uwb: fix error handling 2012-04-18 13:15:51 -07:00
vhost vhost-net: fix handle_rx buffer size 2012-05-11 18:16:57 -04:00
video Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-12 12:57:01 -07:00
virt
virtio virtio_balloon: fix handling of PAGE_SIZE != 4k 2012-04-15 11:51:06 +03:00
vlynq
w1
watchdog hpwdt: Only BYTE reads/writes to WD Timer port 0x72 2012-04-26 14:38:07 +02:00
xen xen/Kconfig: fix Kconfig layout 2012-05-07 12:26:28 -04:00
zorro
Kconfig
Makefile