From patchwork Tue Sep 16 22:00:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 390202 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 210E91400F4 for ; Wed, 17 Sep 2014 08:08:20 +1000 (EST) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id EC9581A0B8D for ; Wed, 17 Sep 2014 08:08:19 +1000 (EST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org X-Greylist: delayed 370 seconds by postgrey-1.34 at bilbo; Wed, 17 Sep 2014 08:07:30 AEST Received: from filtteri2.pp.htv.fi (filtteri2.pp.htv.fi [213.243.153.185]) by lists.ozlabs.org (Postfix) with ESMTP id 7C1571A0171 for ; Wed, 17 Sep 2014 08:07:30 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by filtteri2.pp.htv.fi (Postfix) with ESMTP id 6ADAB19BEA6; Wed, 17 Sep 2014 01:01:14 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp6.welho.com ([213.243.153.40]) by localhost (filtteri2.pp.htv.fi [213.243.153.185]) (amavisd-new, port 10024) with ESMTP id CWaFsSxNddiD; Wed, 17 Sep 2014 01:01:07 +0300 (EEST) Received: from cooljazz.bb.dnainternet.fi (91-145-91-118.bb.dnainternet.fi [91.145.91.118]) by smtp6.welho.com (Postfix) with ESMTP id BEE805BC006; Wed, 17 Sep 2014 01:01:07 +0300 (EEST) From: Aaro Koskinen To: Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org, Phil Carmody Subject: [PATCH 2/2] powerpc/via-pmu: fix OF node leak in Keylargo init Date: Wed, 17 Sep 2014 01:00:54 +0300 Message-Id: <1410904854-26128-2-git-send-email-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1410904854-26128-1-git-send-email-aaro.koskinen@iki.fi> References: <1410904854-26128-1-git-send-email-aaro.koskinen@iki.fi> Cc: Aaro Koskinen X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Phil Carmody If we of_find_node_by_name() then we must of_node_put() too. Signed-off-by: Phil Carmody Signed-off-by: Aaro Koskinen --- drivers/macintosh/via-pmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 6221235..aed3cb0 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -329,6 +329,7 @@ int __init find_via_pmu(void) gaddr = of_translate_address(gpiop, reg); if (gaddr != OF_BAD_ADDR) gpio_reg = ioremap(gaddr, 0x10); + of_node_put(gpiop); } if (gpio_reg == NULL) { printk(KERN_ERR "via-pmu: Can't find GPIO reg !\n");