alistair23-linux/drivers
Julia Lawall aeb35ebc5f [media] imon: Correct call to input_free_device
ictx->touch is intialied in imon_init_intf1, to the result of calling the
function that contains this code.  Thus, in this code, input_free_device
should be called on touch itself.

A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
local idexpression struct input_dev * x;
expression ra,rr;
position p1,p2;
@@

x = input_allocate_device@p1(...)
...  when != x = rr
    when != input_free_device(x,...)
    when != if (...) { ... input_free_device(x,...) ...}
if(...) { ... when != x = ra
    when forall
    when != input_free_device(x,...)
\(return <+...x...+>; \| return@p2...; \) }

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

cocci.print_main("input_allocate_device",p1)
cocci.print_secs("input_free_device",p2)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 16:34:24 -03:00
..
accessibility
acpi
amba
ata Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev 2011-05-14 12:19:18 -07:00
atm drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
auxdisplay
base
block Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2011-05-18 06:49:02 -07:00
bluetooth
cdrom
char drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
clk CLKDEV: Fix clkdev return value for NULL clk case 2011-04-30 10:14:08 +01:00
clocksource
connector
cpufreq
cpuidle
crypto
dca
dio
dma
edac drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
eisa
firewire Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2011-05-04 14:21:39 -07:00
firmware
gpio
gpu drm: Take lock around probes for drm_fb_helper_hotplug_event 2011-05-16 12:01:43 +10:00
hid
hwmon hwmon: (twl4030-madc-hwmon) Return proper error if hwmon_device_register fails 2011-05-01 09:06:35 -07:00
hwspinlock
i2c drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
ide
idle
ieee802154
infiniband
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2011-05-12 10:41:31 -07:00
isdn
leds drivers/leds/leds-lm3530.c: add MODULE_DEVICE_TABLE 2011-05-18 02:55:22 -07:00
lguest
macintosh
mca
md
media [media] imon: Correct call to input_free_device 2011-05-20 16:34:24 -03:00
memstick
message
mfd mfd: Fix for the TWL4030 PM sleep/wakeup sequence 2011-05-11 11:09:58 +02:00
misc
mmc drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
mtd drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
net drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
nfc
nubus
of
oprofile
parisc
parport
pci PCI: Clear bridge resource flags if requested size is 0 2011-05-16 18:33:35 -07:00
pcmcia
platform eeepc-laptop: Use ACPI handle to identify rfkill port 2011-05-09 10:48:47 -04:00
pnp
power
pps
ps3
rapidio rapidio: fix default routing initialization 2011-05-18 02:55:22 -07:00
regulator
rtc Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-05-17 08:02:04 -07:00
s390 Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2011-05-18 06:49:02 -07:00
sbus
scsi Merge branch 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6 2011-05-18 13:25:57 -07:00
sfi
sh
sn
spi
ssb
staging [media] tm6000: add detection based on eeprom name 2011-05-20 09:28:55 -03:00
target
tc
telephony
thermal
tty drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
uio
usb drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
uwb
vhost
video Merge branch 'fbmem' 2011-05-14 11:24:32 -07:00
virtio
vlynq
w1
watchdog drivercore: revert addition of of_match to struct device 2011-05-18 12:32:23 -06:00
xen
zorro
Kconfig
Makefile