Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3407229rwa; Tue, 23 Aug 2022 04:22:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR7mppdR5a+JcVq6FUH12/IoNFklxDxSD6TrUnYHqxBidhUuuKyVkiTKxsC94nPRQ4EGrkZD X-Received: by 2002:a17:90a:ad45:b0:1fa:f352:4522 with SMTP id w5-20020a17090aad4500b001faf3524522mr2817244pjv.176.1661253778921; Tue, 23 Aug 2022 04:22:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253778; cv=none; d=google.com; s=arc-20160816; b=lKl5ofsEGALPzn/ng6f/PVS/XjtMM+PlUHrI1Ik17rP5Gs2KVkStxdxP4d+xn+PhPV X0mTdex4S95vnTgx9ZqygFp+pLTPDsf0fuECGy1Ukm7+0tFnHnbgFbm6MQFNFZwsNI42 vwdBHWXPxBgIHmTIMkvpaH8SIXBEkAHqIbMNazb+016Vqqn/GBr/JDWTWi+TK95cichO 54R4BF1EfCAY1tI8t+g39SUVS/hQLr3fneC5TLChl27Hs2RFekbJLdIZE04RV8bz5BtK 6o7zZ6IbJ7lCTcV7eqo8s5Emy4NBMU5H/9cyn4hpAnVk+uOsKXq8Ais7MMHSPKXISzWg 0ffg== 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=vHmx57xZYHTgkfo+41k85hZ7vWOhUYFOuK1/q2sPZG0=; b=W1XvOn8IX4nXtRyxRcBVijx3M1A7TCnNo7NpTOqMKwaCFqQhsZANfhmH8sUq54MNN6 T+p+3fZQ5ekyN88KWScpUbWV56WCCfU7ErzbC9e9UNPszLUu7IZgysPeTrstHqjd3wnL 4Qp9GYbp+4SJ7SCXOUH5lfShf8801SnoiXJJMwmoBoROzJ47mw3/XuypksYaV5YBfzGi UTSKhc8MxgUrHtC6ja86khotCVIRTeGX+DbvCLL18yIALGFRjwFTrVXBTao05SzQUFE8 lKP5qL5Mt2NGn1kQuKx4hJJAWoaNTbDkOHdpJs5pkzuzXJP/euiTCH5eKTi2leEaWJNK SLqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vw0+sSl2; 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 d2-20020a056a0010c200b0052f44beb0d1si14289518pfu.291.2022.08.23.04.22.48; Tue, 23 Aug 2022 04:22:58 -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=Vw0+sSl2; 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 S1355386AbiHWKif (ORCPT + 99 others); Tue, 23 Aug 2022 06:38:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354372AbiHWKVU (ORCPT ); Tue, 23 Aug 2022 06:21:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 574ECDEE1; Tue, 23 Aug 2022 02:02:45 -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 D3F2A6157B; Tue, 23 Aug 2022 09:02:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4D8FC433D6; Tue, 23 Aug 2022 09:02:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245364; bh=ah1xJbcTpET9sBuUevAzr/FyNFl2c5CRKuewIOVWH6c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vw0+sSl2FeQIeAxevnJnSoZIGMMKJ4XD+rwyHMK5Ff3ec5p2q974Ji7gVxlHhq+ET rMPgTmdrZ9eKNQkY7PI9Y7EUwHfXAbMIAVrC3QwOfedslwZZjwg3KVVL9BpeOBukDo Z/TUiYlA6imhAllmNlX36tadSZKJWe8fNrPhSZK4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Florian Fainelli , Sasha Levin Subject: [PATCH 4.19 055/287] ARM: bcm: Fix refcount leak in bcm_kona_smc_init Date: Tue, 23 Aug 2022 10:23:44 +0200 Message-Id: <20220823080102.093867472@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080100.268827165@linuxfoundation.org> References: <20220823080100.268827165@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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 cb23389a2458c2e4bfd6c86a513cbbe1c4d35e76 ] of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: b8eb35fd594a ("ARM: bcm281xx: Add L2 cache enable code") Signed-off-by: Miaoqian Lin Signed-off-by: Florian Fainelli Signed-off-by: Sasha Levin --- arch/arm/mach-bcm/bcm_kona_smc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-bcm/bcm_kona_smc.c b/arch/arm/mach-bcm/bcm_kona_smc.c index a55a7ecf146a..dd0b4195e629 100644 --- a/arch/arm/mach-bcm/bcm_kona_smc.c +++ b/arch/arm/mach-bcm/bcm_kona_smc.c @@ -54,6 +54,7 @@ int __init bcm_kona_smc_init(void) return -ENODEV; prop_val = of_get_address(node, 0, &prop_size, NULL); + of_node_put(node); if (!prop_val) return -EINVAL; -- 2.35.1