From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Subject: Re: [PATCH 1/2] sound/soc/fsl/p1022_ds.c: add missing of_node_put Date: Mon, 22 Aug 2011 08:55:28 -0500 Message-ID: <4E525FD0.5020806@freescale.com> References: <1313823721-16930-1-git-send-email-julia@diku.dk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1313823721-16930-1-git-send-email-julia@diku.dk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Julia Lawall Cc: alsa-devel@alsa-project.org, Takashi Iwai , devicetree-discuss@lists.ozlabs.org, Mark Brown , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Grant Likely , Axel@alsa-project.org, Lin , Liam Girdwood List-Id: devicetree@vger.kernel.org Julia Lawall wrote: > From: Julia Lawall > > dma_channel_np has been accessed at this point, so decrease its reference > count before leaving the function. > > 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 Thanks, Julia. -- Timur Tabi Linux kernel developer at Freescale