Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1879791iob; Thu, 5 May 2022 09:59:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNCujh3ekxIXwLnMBKq3tYd0ZYMk3CjG0Tz0VFQO6TtbKYN22H9n2h4wZoi78Yt63FKRNz X-Received: by 2002:a17:907:3e03:b0:6da:8c5a:6d4a with SMTP id hp3-20020a1709073e0300b006da8c5a6d4amr27226397ejc.585.1651769966347; Thu, 05 May 2022 09:59:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651769966; cv=none; d=google.com; s=arc-20160816; b=oNU8p+n64/o4xiIhv73/CYWjIfwLMqvMJo0SlF0shc5k/l5YLBXivew2YF8Eh32xKP 02ua047Rlng34J8pNvTpAvf0t7Gs+jRU75PuxNv/t2WNXih+o4C/XHqnhAyKofharZan f3Jz7BuUvjgMgboF0b/K9WUnV2kXaryDwIrgTCp6R+/7DjsSB44NVIro9hLeEYkHdga2 nAsIB9F7sgaMHL4UqqKwmOU2LwnatWQWzbRWbXENudbrw5CJvYR+EE5+fXu1XQndgXk0 fvm5RxDYFCFCCL3pubnJq6dxenEgKgbHWCqYcmKc5fSazOiG8f8gGTcOtPdRhrVjZfUl c3tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VrihqZSDLqPpwzGZhjQ9aNikHYsdrdgnpWJv362gUXg=; b=mCyRNpG+qr/8W5ATxb0B8ObOO/lklT1yadBZowcD9c2HZpx6I5CmgPfNCmHJBfNDcW Osh4cSTJ+Ahn6TKVuMJpVMtSME0N2zfA30BTOyS9WSp2BdhTwQYyR93RDXhWdkR7hLkl fEZLpVge5uVx8y84Y01UfU6+YiJOKNWRMXdrBZGufEq4Pgpaw3nZzLS2a0HpPBKQe2wP U8bP2Av36kZ+Ahv5X8FgEQoTrMiO4qsvWbTKz3VIXMG0doTmWuztbMKFnJ+YxHN6kd5E vK80pI3XTMOuQRw+mg/KYMSdE0CsY69vnBYlfytyRU2MLt46NvBVhwh7OI0vIeOSBY5I crTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PJ5Ui6TU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z15-20020a056402274f00b00427dbb2af95si3093512edd.296.2022.05.05.09.59.02; Thu, 05 May 2022 09:59:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PJ5Ui6TU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354769AbiEDQ7F (ORCPT + 99 others); Wed, 4 May 2022 12:59:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353809AbiEDQxR (ORCPT ); Wed, 4 May 2022 12:53:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2F6A47ACD; Wed, 4 May 2022 09:48:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5B9A161789; Wed, 4 May 2022 16:48:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A99D1C385AA; Wed, 4 May 2022 16:48:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651682930; bh=1Vi5lNYXaB4VTTLQ+lFez2oNueieHQTfkFWql+43bVk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PJ5Ui6TUmAC0s5BJRo3kgonS+QHt5wUarKrDBtFMGO+cV2BWlUPYUmS3aiVaG5062 lCpcwR2pNBkFwbegX6/VN6A1EXaed4Xvm+4noiKTwXPBE5XTQLtRd2IWBwidLxOojQ +dXc0zLDVqYgFN6VTI5RGj/3H3fC8kBJX/R+giMc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Tony Lindgren , Sasha Levin Subject: [PATCH 5.4 37/84] ARM: OMAP2+: Fix refcount leak in omap_gic_of_init Date: Wed, 4 May 2022 18:44:18 +0200 Message-Id: <20220504152930.449088261@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504152927.744120418@linuxfoundation.org> References: <20220504152927.744120418@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miaoqian Lin [ Upstream commit 0f83e6b4161617014017a694888dd8743f46f071 ] The of_find_compatible_node() function returns a node pointer with refcount incremented, We should use of_node_put() on it when done Add the missing of_node_put() to release the refcount. Fixes: fd1c07861491 ("ARM: OMAP4: Fix the init code to have OMAP4460 errata available in DT build") Signed-off-by: Miaoqian Lin Message-Id: <20220309104302.18398-1-linmq006@gmail.com> Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- arch/arm/mach-omap2/omap4-common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 5c3845730dbf..0b80f8bcd304 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c @@ -314,10 +314,12 @@ void __init omap_gic_of_init(void) np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-gic"); gic_dist_base_addr = of_iomap(np, 0); + of_node_put(np); WARN_ON(!gic_dist_base_addr); np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-twd-timer"); twd_base = of_iomap(np, 0); + of_node_put(np); WARN_ON(!twd_base); skip_errata_init: -- 2.35.1