OpenCloudOS-Kernel/sound/soc/fsl
Julia Lawall c09f5ca7bd 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/)

// <smpl>
@@
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 ...; }
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22 23:29:17 +01:00
..
Kconfig ASoC: add support for the Freescale P1022 DS reference board 2010-08-20 12:14:48 +01:00
Makefile ASoC: add support for the Freescale P1022 DS reference board 2010-08-20 12:14:48 +01:00
efika-audio-fabric.c ASoC: efika-audio-fabric: fix resource leak in efika_fabric_init error path 2010-11-25 11:08:13 +00:00
fsl_dma.c sound/soc/fsl/fsl_dma.c: add missing of_node_put 2011-08-22 23:26:33 +01:00
fsl_dma.h ASoC: multi-component - ASoC Multi-Component Support 2010-08-12 14:00:00 +01:00
fsl_ssi.c trivial: don't touch fsi_ssl.c with ioremap fixes 2011-06-14 10:40:40 +02:00
fsl_ssi.h ASoC: multi-component - ASoC Multi-Component Support 2010-08-12 14:00:00 +01:00
mpc5200_dma.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-07-25 13:56:39 -07:00
mpc5200_dma.h Merge branch 'for-2.6.36' into for-2.6.37 2010-08-16 18:42:58 +01:00
mpc5200_psc_ac97.c dt/sound: Eliminate users of of_platform_{,un}register_driver 2011-02-28 13:22:44 -07:00
mpc5200_psc_ac97.h ASoC: multi-component - ASoC Multi-Component Support 2010-08-12 14:00:00 +01:00
mpc5200_psc_i2s.c dt/sound: Eliminate users of of_platform_{,un}register_driver 2011-02-28 13:22:44 -07:00
mpc8610_hpcd.c sound/soc/fsl/mpc8610_hpcd.c: add missing of_node_put 2011-08-22 23:29:17 +01:00
p1022_ds.c sound/soc/fsl/p1022_ds.c: add missing of_node_put 2011-08-22 23:29:16 +01:00
pcm030-audio-fabric.c ASoC: pcm030-audio-fabric: fix resource leak in pcm030_fabric_init error path 2010-11-25 11:08:25 +00:00