Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2927058rwb; Mon, 15 Aug 2022 14:12:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR7fHJKG3m0dnlJcoUJJTfLI8xhQNjuJYEVJWZnx+zlQBnCGwi+AnaL8zCxYKI5CWXrf+m5M X-Received: by 2002:a17:902:f68f:b0:171:55f0:9062 with SMTP id l15-20020a170902f68f00b0017155f09062mr18309590plg.18.1660597948556; Mon, 15 Aug 2022 14:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660597948; cv=none; d=google.com; s=arc-20160816; b=aNRhFIjNxWOHDoffwqe2mPgDYQzNOhDaB0JVElpIcnI4qoZz/+1soITYclSZ/BI6WF GRU0jGx+uaVT7F1dnwPQwUhDMumvg4jaukuQs8mDBYhERMpQo8f20APWi4zurPa7LDUW tygbc6eEoVbBX0XkzqxK11oaCYy+Op3pJHsbOnXQ34O3zcUF/dV9bwXVdmRsVtAi5ng1 CQga96KM/a+REucVemYqjUfc9fSr9HhuR2WfJ2JZuajrKcfythmET7NvpPAjYCcRr4oF eU+mfva/L+luqHOOLp1WWk2AeyLckuC1C+pzuy3Udkn/HO86T/lkv6cG9j6wqw3t+Ied JMdQ== 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=Etes+szE1/rkbWFhuNcU26ztxTaiQ5BVyTGTHB+9Kf8=; b=Krh6CIONl7de3IIRWWvRCznPvYGW5F77poNJhrM9fPXrvrvU+KV9J0OHdBKBBYRLgs aj7U7Jbvum5ITEFGlpIqeCCLGWlOmbV/W9UshBWx9BQD7qsiSv8o2yrrvyPszbh5mvk0 5gcBovk3SoEhtTAMWx5JiljgofpItPd9vwOobS8cSc0ukA7fkG0ybsKAp0F/W3B0qrFG GJq5y36W2LSZ/z07R6Tj6l3D60pyVd7/zuZKSRCGEMSLEJ+GpW60Kdjm5+Ih0xN4fyA0 uCbmAfP6mubftloWzfh4QM0A5ofp4qqzhVtlBgYAXxgni4Fczb/xQLZTHNmFcUea6SE/ 1dYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QpMOrj+e; 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 e123-20020a636981000000b0041d54a204fasi11793673pgc.654.2022.08.15.14.12.16; Mon, 15 Aug 2022 14:12:28 -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=QpMOrj+e; 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 S1348279AbiHOUcZ (ORCPT + 99 others); Mon, 15 Aug 2022 16:32:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347847AbiHOU0n (ORCPT ); Mon, 15 Aug 2022 16:26:43 -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 49DD99DB67; Mon, 15 Aug 2022 12:03:46 -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 DFDD0B81109; Mon, 15 Aug 2022 19:03:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36D8DC433C1; Mon, 15 Aug 2022 19:03:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590222; bh=4za+avW1T/NnoFjLu6YyZVhW3X3P6uxrYzP7gGEKha0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QpMOrj+eOG+3KO0qEOh0OA3j12LexheuouoYOwDqtMkfTuj1lpPOu6nJD6ubRyf75 /hXR5naac8huV+zkFaVwApwjbT9/UVc6a/fCQCA7CLN/Zt1tFomFMof34wDLyyGnmi dUDoQrOaAysHv3M15ZGNY0lqG7Snkp5QSJxgzP2M= 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.18 0191/1095] ARM: bcm: Fix refcount leak in bcm_kona_smc_init Date: Mon, 15 Aug 2022 19:53:10 +0200 Message-Id: <20220815180437.522203928@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 43829e49ad93..347bfb7f03e2 100644 --- a/arch/arm/mach-bcm/bcm_kona_smc.c +++ b/arch/arm/mach-bcm/bcm_kona_smc.c @@ -52,6 +52,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