From patchwork Sat Mar 4 15:02:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 9604005 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 55E42602B4 for ; Sat, 4 Mar 2017 15:03:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 466A927FA3 for ; Sat, 4 Mar 2017 15:03:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39DFC28541; Sat, 4 Mar 2017 15:03:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BBFFC27FA3 for ; Sat, 4 Mar 2017 15:03:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=h+lFkA8uCLmaCGQNYKkeV3M2usT6NoCkOYNzqq9sVso=; b=Hgm3fx1z6HtOi1C6E/eFHzc8PO TGNz/Qiypy/hjZU4EKI3AL4lgzy59fJLkDsVFJwOVVjLyol92z7xlRrtZkt1Ysd1eECAFZcTUD7xO I2e7T38EHnTw8Gn1GAWqGf8q0p3fFrVzdWHCIyeJdqHr0hG+ZILdOacdeF2R/sOb1syV2wWtOM1GW 1/xB4OmVF5yafwWkKf+zZvNIxG6lVgHvpp3HkzCJc2k3OopmW2AO20PROAe0i7GH0FYQayy6siWEG gbyxEIYaC3Ct7SbA9rcgH/Ou3pmgDbo0PZjrP7QOqsKV0NFjAibVLWLRhUVCJIx0r2XciMNIiw348 /a5nkvgg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ckBDd-00073E-Cf; Sat, 04 Mar 2017 15:03:37 +0000 Received: from bh-25.webhostbox.net ([208.91.199.152]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ckBDZ-0006yS-MP for linux-arm-kernel@lists.infradead.org; Sat, 04 Mar 2017 15:03:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=References:In-Reply-To:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=BIP/Ohc9ew+SsebFFDUNu+OUBeY3B4MmH4c6jvL9urA=; b=b7BFXz2G1oS9WuyNMfjNCJy0x y9VKLJ4o/whWnlsRnm0x4NRslRMBrQIwqI5j6/zV69NOPjVw537lGEHaGGZ70os19gxXQJvSXLsXH PdeGmKWGCtnENeWCFv+KrFqnaOQ+n0apEurDYXhY8b0hWBJbNjBhCgpFPofM5hK/sBed2O1MJ/2LA 5kPDBhUttrfJXp8EdB3+D655S3aV7vJIcO6kz2VkEvVfEe2RxxGFA0ts/9+22peUCp9JHE1qjfsfi cthG+KFVASEvQ9QfVzBno27F9U7CQy6GyqYocgS/+LwtrzrEQa5vqUdD/Wk0R3sDdwbKj2NjveW/H GpRt1tovw==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:55836 helo=localhost) by bh-25.webhostbox.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1ckBCZ-0047wD-Pc; Sat, 04 Mar 2017 15:02:32 +0000 From: Guenter Roeck To: Tony Lindgren Subject: [PATCH v3 2/2] ARM: OMAP2+: Release device node after it is no longer needed. Date: Sat, 4 Mar 2017 07:02:11 -0800 Message-Id: <1488639731-8047-2-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488639731-8047-1-git-send-email-linux@roeck-us.net> References: <1488639731-8047-1-git-send-email-linux@roeck-us.net> X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170304_070333_836834_22561660 X-CRM114-Status: UNSURE ( 8.21 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Paul Walmsley , Guenter Roeck , linux-kernel@vger.kernel.org, Qi Hou , linux-omap@vger.kernel.org, Peter Rosin , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The device node returned by of_find_node_by_name() needs to be released after it is no longer needed to avoid a device node leak. Signed-off-by: Guenter Roeck --- v3: Split patch into two parts arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 44b5f9bbdde6..042e460f4aa4 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -3193,15 +3193,20 @@ int __init omap3xxx_hwmod_init(void) if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) { r = omap_hwmod_register_links(h_sham); - if (r < 0) + if (r < 0) { + of_node_put(bus); return r; + } } if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) { r = omap_hwmod_register_links(h_aes); - if (r < 0) + if (r < 0) { + of_node_put(bus); return r; + } } + of_node_put(bus); /* * Register hwmod links specific to certain ES levels of a