From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 069DEC43334 for ; Sun, 5 Jun 2022 17:54:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346674AbiFERyA (ORCPT ); Sun, 5 Jun 2022 13:54:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231337AbiFERx7 (ORCPT ); Sun, 5 Jun 2022 13:53:59 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB01F40A35; Sun, 5 Jun 2022 10:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=eXNU6b6SywjnS70XKysBsjZn8R5pjBPGBIyQlaViQYU=; b=PIBXGS3Cpeww7RqmPi6gB85jyv bDwmM5Y6/HXpinAT9pqz/xuBVyLPXSsZORCvZiQOm7QZYzGNeRH+vYfgbjTrnxvG4TKYOqOfm5Fee yjO9XxKWrVw2KxsuoRlxPXGY8rMinmS6j8M9EgstQZyRPKisg9Qlv0eqGHpidzOyAZwk=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nxuRU-005fKJ-Rg; Sun, 05 Jun 2022 19:53:36 +0200 Date: Sun, 5 Jun 2022 19:53:36 +0200 From: Andrew Lunn To: Miaoqian Lin Cc: =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= , Broadcom Kernel Team , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Florian Fainelli , Arnd Bergmann , Jon Mason , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] net: ethernet: bgmac: Fix refcount leak in bcma_mdio_mii_register Message-ID: References: <20220603133238.44114-1-linmq006@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220603133238.44114-1-linmq006@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 03, 2022 at 05:32:38PM +0400, Miaoqian Lin wrote: > of_get_child_by_name() 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: 55954f3bfdac ("net: ethernet: bgmac: move BCMA MDIO Phy code into a separate file") > Signed-off-by: Miaoqian Lin Reviewed-by: Andrew Lunn Andrew