From: Julia Lawall Date: Sat, 20 Aug 2011 07:02:01 +0000 (+0200) Subject: sound/soc/fsl/mpc8610_hpcd.c: add missing of_node_put X-Git-Tag: v3.3-rc1~14^2~785^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c09f5ca7bdc9a82c5f721bc28c46d65452240cfa;p=pandora-kernel.git sound/soc/fsl/mpc8610_hpcd.c: add missing of_node_put The first change is to add an of_node_put, since codec_np has previously been allocated. The rest of the patch reorganizes the error handling code so the only code executed is that which is needed. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; expression E1!=0,E2,E3,E4; statement S; iterator I; @@ ( if (...) { ... when != of_node_put(x) when != x = E3 when != E3 = x * return ...; } ... when != x = E2 when != I(...,x,...) S if (...) { ... when != x = E4 of_node_put(x); ... return ...; } ) // Signed-off-by: Julia Lawall Acked-by: Timur Tabi Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- Reading git-diff-tree failed