linux-stable/drivers/media
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
..
common [media] tda18271: add DVB-C support 2011-05-20 09:30:05 -03:00
dvb [media] DVB: return meaningful error codes in dvb_frontend 2011-05-20 09:30:56 -03:00
radio [media] wl128x: Remove unused NO_OF_ENTRIES_IN_ARRAY macro 2011-05-20 09:28:37 -03:00
rc [media] imon: Correct call to input_free_device 2011-05-20 16:34:24 -03:00
video [media] saa7134: enable IR support for Hauppauge HVR-1150/1120 2011-05-20 16:31:28 -03:00
Kconfig [media] v4l: Create v4l2 subdev file handle structure 2011-03-22 04:53:26 -03:00
Makefile [media] media: Entities, pads and links 2011-03-22 04:53:10 -03:00
media-device.c [media] media: Links setup 2011-03-22 04:53:16 -03:00
media-devnode.c [media] media: Media device node support 2011-03-22 04:52:22 -03:00
media-entity.c [media] media: Properly handle link flags in link setup, link notify callback 2011-04-17 07:43:32 -03:00