Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2883671rwb; Mon, 15 Aug 2022 13:15:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR5pPmun2/hwifeHb+7Srjct50ZO0N3Xoz/T4kJnf1cgwXzrOcsYp2rauMGrzJauQpvdj5y2 X-Received: by 2002:a17:907:7f9f:b0:733:76c:44c9 with SMTP id qk31-20020a1709077f9f00b00733076c44c9mr11402792ejc.642.1660594557951; Mon, 15 Aug 2022 13:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594557; cv=none; d=google.com; s=arc-20160816; b=sSGl+XgfIzLGy34K9iSV+5MiDFJA2aoHZ1U2oATtSocbU+QGsdKPfuW9IfEbj8uMW6 65xPIPkA3Y64rDNtndcswUElwH3XOHPK5k+bf8/UO3I4vSuw3x22LRdCmmxj8cDUq96m vpvpBizpmsc45aXm189zvM7c/3+wGzKVmOOonJ7++8KBCdcqccnsvJR7u3TxBsNEInWx LX6L7BS+hgX/+XVyuhsHZ8VwUF0adYm2jL4FQtDctUvPf+NJx9T1rYU9mSfySEiG1qTL QNZAQ32Cyzs4/bUbKL4xJiRqocyS+3d603wMyvaedLPMebRUZ14fjCEvbkDGDpyGV5rk 6FTQ== 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=yNQ3Xz5EcyJa5FYAQlDKPRg8ZDXeIXAV9dmLvKjQqheg9203br9dXyF2K4y1FTaWHp AQXNqBb77bj04jbNK1vR3MgyItEAE0RpVjIlme/hJb224h84ghJGsxm1YMG/1jucJEg+ j/1rHhErRdtj6YwtzH98GwKZwjDKlYmfK89XDI7BpfSnZ3tVM2fNcOgImu+1Rt3lOoyo 1BZZKqOzxTmqdTbzq4h7o4KNYeyr2T8Ka1U8Kj3+PLuPawnz1O5xOpfyDLrW7PrXt51P jDj66ay2goQWbOBRZe8EkgZBebzxLRMzJWM3s+wF5sIepYJQBmYTstwH9Pg9zZ/ZV3e4 gUGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=O3uShlJN; 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 w21-20020a170906131500b0072ee7a299f5si7222849ejb.19.2022.08.15.13.15.31; Mon, 15 Aug 2022 13:15:57 -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=O3uShlJN; 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 S242829AbiHOSha (ORCPT + 99 others); Mon, 15 Aug 2022 14:37:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243898AbiHOSgC (ORCPT ); Mon, 15 Aug 2022 14:36:02 -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 96F2F3B960; Mon, 15 Aug 2022 11:22:55 -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 2029DB80F99; Mon, 15 Aug 2022 18:22:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E422C433C1; Mon, 15 Aug 2022 18:22:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587773; bh=4za+avW1T/NnoFjLu6YyZVhW3X3P6uxrYzP7gGEKha0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O3uShlJNexBGSpRt1BD8sqKfWIkQwVmzN2sfDzvCf0oVADWeGcsXIeTiFw8btRSMR M1nhzsBf81vXlq2KBO5oKck/Cf4v2yZDs7Fg6Uo6Km4CyWcyvGBfKtOJ3KMpBtJftf p1ZXcmuIUMEm5OTVX4tKmgpxVBqD8/9bFEphxN+s= 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.15 159/779] ARM: bcm: Fix refcount leak in bcm_kona_smc_init Date: Mon, 15 Aug 2022 19:56:43 +0200 Message-Id: <20220815180344.152497709@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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