From patchwork Mon Aug 3 07:25:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 11697509 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 753FA722 for ; Mon, 3 Aug 2020 07:27:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E5E3206E9 for ; Mon, 3 Aug 2020 07:27:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lcbWMA8r"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="T9ODTq3b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E5E3206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=cjryF21G/NbocQd+3bY1EGHHx4NLJfIMrv47Gasrn8A=; b=lcbWMA8rGLyjPcBdKbx9zgsGD csqQ+RLmlk0BAvcu2HrDE75TnVwmHFwiqZIQTyuZQBt3uJ09Bxe/HSr3mWyBFv0gB+1VLS0cTnnTj dMYoW1Hw/YYNw72E8l+gUJsvLlWurLudK7+uV/ZsdG0ZFDcPEwS+0ZJ9RreXbac1b3ELblncrAgHm fU9w0AZ+77EPdll7ls0/vH7TY8uoXLyCqr3CE4k5M/QaTm6TsfOcZq3EZNl67R1lDZVuO8UYRxtjA 191xhUUtfsk41q3yBS2rITu/7FRs4lWk4hQCtHTVyHH6Wu4cb3/jR9iCdL/bm3pYTF4IM8PLTwz9n 7KU8dYwqQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Uqp-0000mC-M5; Mon, 03 Aug 2020 07:25:40 +0000 Received: from esa1.microchip.iphmx.com ([68.232.147.91]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2Uql-0000j7-1Q for linux-arm-kernel@lists.infradead.org; Mon, 03 Aug 2020 07:25:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1596439534; x=1627975534; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=FR4Uar89M801Ogjt06aJ8ElOzC2Rm5sCdn/Dj7DNFlI=; b=T9ODTq3b0uwdjSoZ7Lfx/g0o1M/058Mss8cQb3kPYf1jH0Ea5LpXgR5e m9+xprXPsEdBcoCSJ6vn3SY+uIOI0FQR3kdzufNUTbD15NNyUS6EpifYs jdqMYF+5DC/kY63/N7xZpncMW0Mkpm5URYirvtNI7RbUn5KC8hDWqU8yD 2fAAgyBlDNe5IAk7zJVkIGeTwFPkDSCI3/91cl8ckRUtV++ipH0o/JJ4i VBFXhuw7wajvwTmdlaQ5rhfjUSBCehn46QGrd8fo4VDEq6GTQgZwGTwPI DrLR2/xCX8YvZw88b5iZq/g6ykJFFZvJl6+JzOFysKZN4mEQhqw+eZ2NS g==; IronPort-SDR: GosEPmJBhxETLcwKwNGZ//r3creh5djcPbrjWXnu8vtM9ty8iWuuS2OVhhAIS9wUr+aOUaBEoE mOq56HyuvWPq7KlwAqc7WOizyJHsu+XznJ0DSvE7GJuzPVTUsuzFf+pVZGAqXuug7+ybfdFxIh XUk4I1EOodMRMJfDU7hlzGMkb0dd8OOcsXlY4fWx3zm45ouiRptiCf/CVVhsvD9/GSyyZIfPVm MdzhF5vEvlqQj+rAOjQZE3/RueIUfYWLda6wVmn6rX5DFR3v6YusuNJKqbni7i05dK94qTvO67 B90= X-IronPort-AV: E=Sophos;i="5.75,429,1589266800"; d="scan'208";a="90194271" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 03 Aug 2020 00:25:32 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Mon, 3 Aug 2020 00:25:31 -0700 Received: from m18063-ThinkPad-T460p.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Mon, 3 Aug 2020 00:25:29 -0700 From: Claudiu Beznea To: , , Subject: [PATCH 3/3] ARM: at91: pm: put node after its usage Date: Mon, 3 Aug 2020 10:25:17 +0300 Message-ID: <1596439517-12993-4-git-send-email-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1596439517-12993-1-git-send-email-claudiu.beznea@microchip.com> References: <1596439517-12993-1-git-send-email-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200803_032535_237552_E6B824AB X-CRM114-Status: GOOD ( 10.66 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [68.232.147.91 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [68.232.147.91 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org of_find_matching_node_and_match() returns a node pointer with refcount incremented. Use of_node_put() after the node has been used. Fixes: 13f16017d3e3f ("ARM: at91: pm: Tie the USB clock mask to the pmc") Signed-off-by: Claudiu Beznea --- arch/arm/mach-at91/pm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index caf87efc7eeb..3d2ee8273b4c 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -849,6 +849,7 @@ static void __init at91_pm_init(void (*pm_idle)(void)) pmc_np = of_find_matching_node_and_match(NULL, atmel_pmc_ids, &of_id); soc_pm.data.pmc = of_iomap(pmc_np, 0); + of_node_put(pmc_np); if (!soc_pm.data.pmc) { pr_err("AT91: PM not supported, PMC not found\n"); return;