Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4665434iob; Sun, 8 May 2022 21:10:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBtTkKr3r2N/pGq0lJj08hqGC7XJ53uQO9KyU63HMgZK+K83WbrWV1Z9AKa3ztznqVcCX/ X-Received: by 2002:a63:2f47:0:b0:3c6:a5fc:8f8d with SMTP id v68-20020a632f47000000b003c6a5fc8f8dmr4515522pgv.327.1652069426828; Sun, 08 May 2022 21:10:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652069426; cv=none; d=google.com; s=arc-20160816; b=ne+Y4tTZXYOO9g9NvWWwqNawXU+oGLMVnSLguNI1zNxqpT+Yrnp8SPYVhdB/WOA8jW Y7l1SOq/S5KSHkUd0aOZTmsa4H7+G7CzfwCIfFMnoHHTFJMAipIpVTGR0FVuooGoKaFu jrF5eH+AlISM+byYwgIIkCaoOP860Ywsijc8b9F4OdkSWt2BX29WzkVFhKd5T26jUMRE ioIKI8uwyZxPf3ofx6Hiotq56ebRFg/Mm4RMxZEJwPGGSPhX6L0bNty1zeGHhMIlkkDO Ciz+iTPhKwNx9cBKKg1qUe0eD2f7pWtaGarb654B8u3rfbvwfq2Sk8R1xNbkQjBjvejt 4GRA== 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=hQcNcr3CAzQ6rd7DeEyb9fHNFYSZ5CjCMAUUCpyTq6k7ka75XGblSN3WZq/zU3veaD YVhh1QmiqYSvx8g9CjkOHzV7IqumCwn1vrRJLcN0gIeUjYfqnuyWi99ZpYTIS7WNkXkN AP9fm7/LtngPttjHsVDstVbtA8qW8J+844JIDe8tX1piPOFfIPwve0K58qNjmiUKELIg AB1ASI82Dcu1fEppSOMMnXOOEVJOggIIz5tRjYdzI8b8gh48wC9cohvZtaDsYynrndHG LHuoLV9qBTbNTxpl0UmMMjNTmaY4PeH4Wp7ryfjqXKg9nvGUyl+nK+8cghr0pbQF+roo IACA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xq7aI1nn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id v5-20020a17090abb8500b001d2a904dad6si18394051pjr.19.2022.05.08.21.10.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 21:10:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xq7aI1nn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 24DE510DD0D; Sun, 8 May 2022 21:09:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358193AbiEDRUh (ORCPT + 99 others); Wed, 4 May 2022 13:20:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355912AbiEDREr (ORCPT ); Wed, 4 May 2022 13:04:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25AFC4F9F7; Wed, 4 May 2022 09:53:30 -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 ams.source.kernel.org (Postfix) with ESMTPS id B8490B82552; Wed, 4 May 2022 16:53:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55951C385A5; Wed, 4 May 2022 16:53:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683208; bh=1Vi5lNYXaB4VTTLQ+lFez2oNueieHQTfkFWql+43bVk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xq7aI1nnaGekiPYH0yCzm0qEgLKpHQA4F+6uq6yo7QywWHwafHkKa9JoIY8ht4pqt 9SOyCiWgiHBKwju2gXJV03iUxHw+QWO34BIrfpo+zMfxTxYTO40+8Domwdt0XvdCkF e879SO7VxkxTDw2BjNalHLXh+wkUBIVV1I5ygzK4= 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.15 060/177] ARM: OMAP2+: Fix refcount leak in omap_gic_of_init Date: Wed, 4 May 2022 18:44:13 +0200 Message-Id: <20220504153058.382145171@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153053.873100034@linuxfoundation.org> References: <20220504153053.873100034@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=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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