Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3020981rwb; Mon, 15 Aug 2022 16:18:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR6R/kHC7dvzgxM172m5ZpWxBtwNxK7XKOS/oi0zSvOOv8EZ3XgqwKKTo5KpwmgTdHPQQe82 X-Received: by 2002:a05:6402:538a:b0:43a:298e:bc2b with SMTP id ew10-20020a056402538a00b0043a298ebc2bmr16061691edb.125.1660605490195; Mon, 15 Aug 2022 16:18:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605490; cv=none; d=google.com; s=arc-20160816; b=zHd5+FXrrmHTGaeAx6bpjPV7uI1elL7vWlpc7Qddb4kGDTZ02/fT4gGNhWO9tRYq/O 0KhEtrUlWLtl8Few8AeKcZR4A8Ox+xfRLAKBcoraCZYTH7A21To39wYC4Xt1U6kf/sfs 7ye4wDxxZx44LJTOM52BrY7y8aGBXwhcmVlyoZULr3KbzcDmQZt+A5rPPh+MS1tkqwz2 piLsyog7677aA1jjN/gXMN3IQRuhmNN6vmRdAb1t73hBj3JiPgoIDQqyOVZi+r6ctgz7 a9qWZh1So7uy999lySZDONrzhzP6VQXHhb+tU9UGSyk3LjYszKMEiInVTEwH2cHR2Q7C eiXA== 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=B65x6CC9hxX0EhZA5kVN9bbNhA7JSwKSOtQmy5AP2Z1j/EcWAMkLepxRFrqXWh2eSJ vRvHIlLibMeLCxODfw/gBEHlpGznA+OKKM8eG0edMG4zJ3nsLbEizw8pzscSKvXWi+F8 0itODUhdooq/pBLtGJfGjcmXKm1t+PCmLyqySl+2fiy/zCt5G44WUfotI3BR/R7pWRe4 3cd+XSBOBid5Rs6VpDSk9U2Fx2hvqmk+1SUQprRtAQLCIVinCwABfn7gMRCfDKTrzPEj ZjVi9wY4nKfrJhpaFkMml+FEsRS1YMrCmoGhG6YhgQn71fQ3hXwmQ8Zq2w+u97BJv5eD S6zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pPjRL9dX; 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 gy19-20020a170906f25300b0073097bd94ebsi7015902ejb.473.2022.08.15.16.17.45; Mon, 15 Aug 2022 16:18:10 -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=pPjRL9dX; 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 S1351457AbiHOWmS (ORCPT + 99 others); Mon, 15 Aug 2022 18:42:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350962AbiHOWhX (ORCPT ); Mon, 15 Aug 2022 18:37:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 688725E308; Mon, 15 Aug 2022 12:50:48 -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 15789B81144; Mon, 15 Aug 2022 19:50:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A258C433D6; Mon, 15 Aug 2022 19:50:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593021; bh=4za+avW1T/NnoFjLu6YyZVhW3X3P6uxrYzP7gGEKha0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pPjRL9dXaRjIUk30Om5ushrdgXIzA7EJpyvrTvIN29sbfg2L3v7D2YEx4cMk7xDgb YbN7c0lKod4UCjWb1naHR3mrNe73zBXGLzrFcGAjVDzt5vFQ4HBqf9LeSnhQxXgQMN z1GbnwWBvHW4mVFzN/RBAbXmjKniEUJ+ZMkU5s4Y= 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.19 0201/1157] ARM: bcm: Fix refcount leak in bcm_kona_smc_init Date: Mon, 15 Aug 2022 19:52:37 +0200 Message-Id: <20220815180447.715935139@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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