Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1860852rwb; Fri, 19 Aug 2022 10:35:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR4RHPDeWMaj4d0VfqcxkKrmHY3+AWkngvtDnbOl+IeEDNiWhlV+JvoC0v+VfMDolJjvvUgY X-Received: by 2002:a05:6a00:2918:b0:536:3967:5d08 with SMTP id cg24-20020a056a00291800b0053639675d08mr1407414pfb.68.1660930538865; Fri, 19 Aug 2022 10:35:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930538; cv=none; d=google.com; s=arc-20160816; b=bHjB9gtS/2I+NJUkCk1aRR1iLyBeYvqJfBvSKOtMdkWcVXnXoHUEHZeXK65a1cbkac ybcRdxPF75fstZT0ovuDV9EgeDL5A7iTJfCV+Rh+9YPIiEU1viFDZRrXAh9p2jEOtxVA EGshLXx5foZxWuuA8KpjFMe2wqIRrmU60NRPGNUJFCWbRBlM3cjJ3DmL1ZUrjy/WVJjW T2JgHde0Q8/wxFT3z75heRhqsG+04tgyMTEJcq4sErzaBMnzrWAPU/SLgBj1jYUA9Yax 9X3y51fdpVsbiCKyxc4HrZFG7xubAoEoFOC4FOfMhCTKAnb6yxavOQEcRhq7gyACdSb/ gM2g== 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=tYCDnp9uhj5UCqdHGCymP4adIoNppUv0JcC6lvYiQC8=; b=kdMOTQvFNxMy9tm+pBHSw4Psu05aUofWCquhLhZhPOZ3qesvtH5GggKF/1mnldtZvR blVEbiy7Vj0EIwNv61DUapRuoMGXO5w4B/GcJaUJbTY7Qa676vSo57UJXPVdBOgYP25k ZbSRIxxmgp9R3h6NkuMNwu4+AkR2qMIQ9oTZMJu0lxJZib9oWQV5cL4i7RkkR5eSG+YK v9VHT02qINk5Cg4x4TZWGE0ob4EOf/HuecaHE8ZIcnbJ+QZNEUPv4Ty8Ia8fhBD6DT5k 80qh7zkRE4NLnCHuRtmxojutbBAOPCJsHoqqEkJtOeQ3IWD1W0nCVyckJ6J8vnOQCXsw Uemg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xdQvf0Bb; 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 f1-20020a056a00228100b00534f2eff1d3si1379262pfe.173.2022.08.19.10.35.28; Fri, 19 Aug 2022 10:35:38 -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=xdQvf0Bb; 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 S1350906AbiHSP6z (ORCPT + 99 others); Fri, 19 Aug 2022 11:58:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350974AbiHSP4I (ORCPT ); Fri, 19 Aug 2022 11:56:08 -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 A07B152FDB; Fri, 19 Aug 2022 08:51:08 -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 060EFB8277D; Fri, 19 Aug 2022 15:51:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D510C433D6; Fri, 19 Aug 2022 15:51:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924265; bh=nHlSxlq3+rvZNO4BoQZpyhlxjtlURvU4B7fVlq7DHS8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xdQvf0Bb81oa+KXshFdUSDtI7/18ZABnb2kBFZ3WqC9sMuxhGPHQA0bRpGntlehZR 6aJH8Ok+EjbNsVUUF9sEa8HLpfZrePOrSiLpf7TRemauX5q+ySMLnNBkWen7DQya3L Hfd3OJME44zw1jqgjZnis4EFDeTNlboRYr+btqCk= 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 5.10 111/545] ARM: bcm: Fix refcount leak in bcm_kona_smc_init Date: Fri, 19 Aug 2022 17:38:01 +0200 Message-Id: <20220819153834.260329147@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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 43a16f922b53..513efea655ba 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