Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3785838ioa; Tue, 26 Apr 2022 09:50:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBngFZDwwQZjsmGpwlu1uVVGvHhpVL8euEoVsOtYdLIYsgnYkFID5QnvqUzbHNT2MoxR5T X-Received: by 2002:a63:5020:0:b0:39e:5d26:4316 with SMTP id e32-20020a635020000000b0039e5d264316mr20416702pgb.294.1650991826980; Tue, 26 Apr 2022 09:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991826; cv=none; d=google.com; s=arc-20160816; b=xf1vrUL/hBtCbIvv39db+eDkGTfl9/Atgr1RVLcP4eWcslztjiBYb/xglwwLLXAbzF pM0MmpTUy/X+BoJ53OAew5tE1mEex4ZBMx+bu9sFGzH3bkgaBy92e4wh71CmMTuDmldO 0gKPweQAwr+BP5nyAjg5Vy7uqLo6sWJeJSkGNNEUk8k1vdFxQO+CBcwJ+IS+D8uxqzoc UVrih/vWoluANWbqSEeH7/rPsJNkcRbsht1RgvhsHqQ8CmyDCPsv4nRvrGSXjkfMGoSm RdTEyzlkeC0xUC6v3T1S3appbgRiz19JitUOzInStx/lKgoMwwwucWqjgs0qZRmVzXpY t73A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=60i7Xt7HM217zqLUEo3z9S04bHqLFQDBqxSFLSXT59s=; b=AwIdccaWSETJ7JKKE0dDDK81A4dSmraacgU54ggaHc9xqF4T2ItjhFqMkAeoPQOQ51 aScpUDFTzc9p4AyH8h2I92OOO8d6yyxtZi8f6MK+r0qq9IYSNlZ0+ygjGl/YCm1xF75f W5Tza8cVmnnqUV5BBH8IGxpIWIDa4ZO31uKVLIYqv/CJtoiCVFJ5693GbLwt5kKWZ/sp r+RpV1As5w4vG4H1K/nvnIlpTA/jk5s07UVFtp3Fd7FOWyG9p631KVrQpw5V8V0REICV CL4/EDPSok8UoS37xoKL/a6El9EfjgnNc1vgNAX4L/2YAYi7/TWraxtIMhz4MhqrTpKf 7z7w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r64-20020a632b43000000b0039dd76b58e0si20828210pgr.687.2022.04.26.09.50.06; Tue, 26 Apr 2022 09:50:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351673AbiDZOgS (ORCPT + 99 others); Tue, 26 Apr 2022 10:36:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351647AbiDZOgG (ORCPT ); Tue, 26 Apr 2022 10:36:06 -0400 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8DAB9B7C62; Tue, 26 Apr 2022 07:32:58 -0700 (PDT) Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1njMFK-0004FF-05; Tue, 26 Apr 2022 16:32:54 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id CDD39C01C7; Tue, 26 Apr 2022 16:32:45 +0200 (CEST) Date: Tue, 26 Apr 2022 16:32:45 +0200 From: Thomas Bogendoerfer To: Yuanjun Gong Cc: Florian Fainelli , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] mips: cpc: Fix refcount leak in mips_cpc_default_phys_base Message-ID: <20220426143245.GF18291@alpha.franken.de> References: <20220407042657.28614-1-ruc_gongyuanjun@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220407042657.28614-1-ruc_gongyuanjun@163.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE 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 On Thu, Apr 07, 2022 at 12:26:57PM +0800, Yuanjun Gong wrote: > From: Gong Yuanjun > > Add the missing of_node_put() to release the refcount incremented > by of_find_compatible_node(). > > Signed-off-by: Gong Yuanjun > --- > 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 17aff13cd7ce..3e386f7e1545 100644 > --- a/arch/mips/kernel/mips-cpc.c > +++ b/arch/mips/kernel/mips-cpc.c > @@ -28,6 +28,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.17.1 applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]