summaryrefslogtreecommitdiffstats
path: root/kernel/profile.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2011-05-27 01:25:59 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-27 02:12:37 +0200
commitd98808a253f209465ed9f415c565f4c294a213b8 (patch)
tree4d60da0dc3a2ad367edbb2c3c51c352bce7da918 /kernel/profile.c
parentedac,rcu: use synchronize_rcu() instead of call_rcu()+rcu_barrier() (diff)
downloadlinux-d98808a253f209465ed9f415c565f4c294a213b8.tar.xz
linux-d98808a253f209465ed9f415c565f4c294a213b8.zip
drivers/char/ppdev.c: put gotten port value
parport_find_number() calls parport_get_port() on its result, so there should be a corresponding call to parport_put_port() before dropping the reference. Similar code is found in the function register_device() in the same file. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @exists@ local idexpression struct parport * x; expression ra,rr; statement S1,S2; @@ x = parport_find_number(...) ... when != x = rr when any when != parport_put_port(x,...) when != if (...) { ... parport_put_port(x,...) ...} ( if(<+...x...+>) S1 else S2 | if(...) { ... when != x = ra when forall when != parport_put_port(x,...) *return...; } ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/profile.c')
0 files changed, 0 insertions, 0 deletions