Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp441850iog; Mon, 13 Jun 2022 06:05:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFuD3sgS3YWVaXJx5QkJK5liriH4yI7LMuz8Uq1hd+80KsD1UXGw16YYy5mHoUVK1QgPSA X-Received: by 2002:a17:90b:4c8d:b0:1ea:8c6a:6aa with SMTP id my13-20020a17090b4c8d00b001ea8c6a06aamr15241778pjb.56.1655125525663; Mon, 13 Jun 2022 06:05:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125525; cv=none; d=google.com; s=arc-20160816; b=ol6cp++4IXreQBO4ffUTk4dV8l5C9FoKxLStHWf5bdia/7gDloHU/1f/AD+sni9oXQ NDcvcPXUEKmeWtfBhr71ga+yoCRLfHffGRmUVZEbvR5nWlrdi1DEElvynv+EEfCFaHE7 kRdIVwV7Vo0OOZQDyT09LsJOsIcZ6dC2AcvYc0SsRjLpMDmrbLVryQwyw6NswBJRVmfp S6wBXXl/cQVbAhLunkmtLgWCKcahn3675Drtjofate58G8oA4oiR4Bi0+0FomBioDPtC 40UZxUB4U2cnKBYb/zY5k4C/jieJei2Mx+yOVrQIPRRx43/skla/OLa064kt/HT9+Lpr CetA== 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=z5NRp0aoac1fN0QhoeZKDxAGf/LoNedo+ySmNBC06m4=; b=v5BgqBujoJuVqPdjiEA4BdYsJw8S5YWXgfsSVFydgMrMiFkmuU3VrbM7xw7fyY85Po 8J36pa2VrT3IXQpH2DTuegWvWoTwFe2v+aDT4lZA0HboTVJpdFA3vaTOW4dHjr7rKOpd ran1BE9cy2vCTiAsE5QHFmWFSLSh8Un7Hchia51rfPrytgxIgxL8d8oZ8c1KCkBG+Gxo 7IbpAG79foz49yHP44wBxbdZflVDw3Q3k4H7zBE5pPCVmxtNa6S7TaFwKsFKWlwae/DY W8Fj3OkPv2EgSj9hc6ZfNwvoLRBbvso18hVwY4h6NjpGSOG1t3QLY8kSz9uU8AY570b2 TUKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JgoHuS26; 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 w69-20020a638248000000b0040554829f04si4700391pgd.466.2022.06.13.06.05.06; Mon, 13 Jun 2022 06:05:25 -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=JgoHuS26; 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 S1351244AbiFMLGy (ORCPT + 99 others); Mon, 13 Jun 2022 07:06:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350868AbiFMK7A (ORCPT ); Mon, 13 Jun 2022 06:59:00 -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 4ABB91928A; Mon, 13 Jun 2022 03:32:30 -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 7EB18B80EA3; Mon, 13 Jun 2022 10:32:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D95BBC34114; Mon, 13 Jun 2022 10:32:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655116348; bh=/gEi9uoEGtw9vFKpk5iTBlPbocY+K5T7zTqsewRdOx8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JgoHuS260zbY8LTHsFkTfqhD19Guo9yXFvd1M7wIluxamqFS9di/aBM44N+s9lHTb Z4LQyUYpS+9YILilP9gDEzak+/dv0bNxc3rc9jsdqoQrbpI9bwiwNzsLJsy5arWTL0 4/8iVaiEH66qicJBGK5OjPJcHNnCzJrFsGRYz97w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gong Yuanjun , Serge Semin , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 4.14 165/218] mips: cpc: Fix refcount leak in mips_cpc_default_phys_base Date: Mon, 13 Jun 2022 12:10:23 +0200 Message-Id: <20220613094925.605068397@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094908.257446132@linuxfoundation.org> References: <20220613094908.257446132@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 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: Gong Yuanjun [ Upstream commit 4107fa700f314592850e2c64608f6ede4c077476 ] Add the missing of_node_put() to release the refcount incremented by of_find_compatible_node(). Signed-off-by: Gong Yuanjun Reviewed-by: Serge Semin Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/kernel/mips-cpc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/kernel/mips-cpc.c b/arch/mips/kernel/mips-cpc.c index fcf9af492d60..cf46502c605e 100644 --- a/arch/mips/kernel/mips-cpc.c +++ b/arch/mips/kernel/mips-cpc.c @@ -31,6 +31,7 @@ phys_addr_t __weak mips_cpc_default_phys_base(void) cpc_node = of_find_compatible_node(of_root, NULL, "mti,mips-cpc"); if (cpc_node) { err = of_address_to_resource(cpc_node, 0, &res); + of_node_put(cpc_node); if (!err) return res.start; } -- 2.35.1