From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754482Ab2AXAj7 (ORCPT ); Mon, 23 Jan 2012 19:39:59 -0500 Received: from e34.co.us.ibm.com ([32.97.110.152]:50702 "EHLO e34.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753864Ab2AXAj5 (ORCPT ); Mon, 23 Jan 2012 19:39:57 -0500 Message-ID: <1327365590.11738.3.camel@work-vm> Subject: Re: [PATCH 13/15] drivers/clocksource/cyclone.c: add missing iounmap From: john stultz To: Julia Lawall Cc: kernel-janitors@vger.kernel.org, Thomas Gleixner , linux-kernel@vger.kernel.org Date: Mon, 23 Jan 2012 16:39:50 -0800 In-Reply-To: <1326362117-29371-13-git-send-email-Julia.Lawall@lip6.fr> References: <1326362117-29371-13-git-send-email-Julia.Lawall@lip6.fr> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.1- Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12012400-1780-0000-0000-000002923EDE X-IBM-ISS-SpamDetectors: X-IBM-ISS-DetailInfo: BY=3.00000245; HX=3.00000181; KW=3.00000007; PH=3.00000001; SC=3.00000001; SDB=6.00107561; UDB=6.00026963; UTC=2012-01-24 00:39:56 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2012-01-12 at 10:55 +0100, Julia Lawall wrote: > From: Julia Lawall > > Add missing iounmap in error handling code, in a case where the function > already preforms iounmap on some other execution path. > > A simplified version of the semantic match that finds this problem is as > follows: (http://coccinelle.lip6.fr/) > > // > @@ > expression e; > statement S,S1; > int ret; > @@ > e = \(ioremap\|ioremap_nocache\)(...) > ... when != iounmap(e) > if (<+...e...+>) S > ... when any > when != iounmap(e) > *if (...) > { ... when != iounmap(e) > return ...; } > ... when any > iounmap(e); > // > > Signed-off-by: Julia Lawall Looks good. I've just queued it. Thanks for sending this in! -john