From: Julia Lawall Date: Fri, 22 Apr 2011 20:46:21 +0000 (+0200) Subject: drivers/tty/moxa.c: Put correct tty value X-Git-Tag: v3.0-rc1~338^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df43daaae926c3710eda911ec048808c904572fe;p=pandora-kernel.git drivers/tty/moxa.c: Put correct tty value The tty value that should be put is the one that was just gotten by tty_port_tty_get, not the one that is the argument to the enclosing function. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @exists@ local idexpression struct tty_struct *x; expression ra,rr; statement S1,S2; @@ x = tty_port_tty_get(...) ... when != x = rr when any when != tty_kref_put(x,...) when != if (...) { ... tty_kref_put(x,...) ...} ( if(<+...x...+>) S1 else S2 | if(...) { ... when != x = ra when forall when != tty_kref_put(x,...) *return...; } ) // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed