Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3413325rwa; Tue, 23 Aug 2022 04:29:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR6b/hmAw1G3hQ7D2gNa3dVuxIo1dW9nzxsVKyJ86VUZwzBpmKRfFqL2kH16D/ek8UntBW95 X-Received: by 2002:a17:907:9727:b0:73d:981d:de2c with SMTP id jg39-20020a170907972700b0073d981dde2cmr2518503ejc.484.1661254175064; Tue, 23 Aug 2022 04:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661254175; cv=none; d=google.com; s=arc-20160816; b=VnVy5VBUeE7jeIHOW1TCw7qWkWp4r2Rbwh1eZjOEMto1NgPtfRVeoW6HqW1/FW0zwk wdq9yU6tVimMyV9zLSHUDYBnns7qk092D5CA51vfRsNcTlH6+pCNdeTXdNgdOXRcND2w jcHllQKWgzBPhJ0xSBwPwekSLzx6byqvadZ5Wbvo/KtWOOjcfT7v/zOr3bGVcV6nJOEN P8ivTHrbkQne2W0jH1JpizQIGyU1yy1AK01fNf2nUriBZ73hB0ThwxIthSS305W7eSyR C0K7F0kT9NC33T55oBSaECNpVWKW2a3zQPi6E1V5hW3O1bUscuONhhMnfSe/tvdprgbH aSIQ== 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=mChpi7cCopUlXVKfQ+1sZO3ifZbgr42s9X6oZlYKGI9fBm8uDSSQhPjuPHHMHQoDMQ OhWUoFYkltCYLNvfveoGauvnjEC+k1mLakhPFzNag445L5NhD9P3doc1U4imM6jAXhbQ ZD7Fxade3onVlpbWTN9rlWrbuafCn2V1rLSANBorS6Eq2B/mQqpAsYR3MhSISKQWLPBX WMBJJgRVZ5hP8mWf2vnpcl7lqVRh+8YE4YDQ2lOkWylRH0+szhrzV7Wqgl4g+UBUiYPv 5LIvJpa0jqW7ou8c2fMYqWxH2cFoJzxMmQOnT6uFnil5Ai4hExNTDAIyzfx7RoqxEPJx XgqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dRrqu7Nb; 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 tl24-20020a170907c31800b0072ef491cc0dsi9532755ejc.113.2022.08.23.04.29.08; Tue, 23 Aug 2022 04:29:35 -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=dRrqu7Nb; 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 S1350592AbiHWJcS (ORCPT + 99 others); Tue, 23 Aug 2022 05:32:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350701AbiHWJao (ORCPT ); Tue, 23 Aug 2022 05:30:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D4DC92F5E; Tue, 23 Aug 2022 01:37:59 -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 2C7CA61544; Tue, 23 Aug 2022 08:37:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38C1CC433D7; Tue, 23 Aug 2022 08:37:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243878; bh=ah1xJbcTpET9sBuUevAzr/FyNFl2c5CRKuewIOVWH6c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dRrqu7Nbeh4JV1V6vZSB5baNpa2E6zHeVUXrmmy6pjAAMOw4gEUEFmok7eHPQg9E4 2Gcu5BKwlki7FTXwmueVr9YJvwqY0sVrL6XvxLKV6HI7oKjnOewtGgxxFWW1sZ4UCH XduCLP8He4IaeHa4lfJ09theR5ezKkIp3Fy469ts= 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.14 050/229] ARM: bcm: Fix refcount leak in bcm_kona_smc_init Date: Tue, 23 Aug 2022 10:23:31 +0200 Message-Id: <20220823080055.476822401@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080053.202747790@linuxfoundation.org> References: <20220823080053.202747790@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