From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751892Ab1HVNzm (ORCPT ); Mon, 22 Aug 2011 09:55:42 -0400 Received: from db3ehsobe002.messaging.microsoft.com ([213.199.154.140]:2269 "EHLO DB3EHSOBE002.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750915Ab1HVNzi (ORCPT ); Mon, 22 Aug 2011 09:55:38 -0400 X-SpamScore: -13 X-BigFish: VS-13(zz1432N98dK4015Lzz1202hzz8275bhz2dh2a8h668h839h62h) X-Spam-TCS-SCL: 1:0 X-Forefront-Antispam-Report: CIP:70.37.183.190;KIP:(null);UIP:(null);IPVD:NLI;H:mail.freescale.net;RD:none;EFVD:NLI Message-ID: <4E525FD0.5020806@freescale.com> Date: Mon, 22 Aug 2011 08:55:28 -0500 From: Timur Tabi Organization: Freescale User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.19) Gecko/20110429 Fedora/3.6.17-1.fc13 Firefox/3.6.17 MIME-Version: 1.0 To: Julia Lawall CC: Liam Girdwood , , Mark Brown , Jaroslav Kysela , Takashi Iwai , Grant Likely , Axel Lin , , , Subject: Re: [PATCH 1/2] sound/soc/fsl/p1022_ds.c: add missing of_node_put References: <1313823721-16930-1-git-send-email-julia@diku.dk> In-Reply-To: <1313823721-16930-1-git-send-email-julia@diku.dk> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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