Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1690872pxa; Sun, 23 Aug 2020 12:29:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyokXRGNkDA1MBWXxwRgQvTYyvnSXRpOrtsPmIk0vxvUHFHoUHOXllxJaNUeNruikqVXwck X-Received: by 2002:a17:906:12c7:: with SMTP id l7mr2541619ejb.306.1598210973265; Sun, 23 Aug 2020 12:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598210973; cv=none; d=google.com; s=arc-20160816; b=M+q88kZQgoy0kiaCkEC+NnR5jipKfFVwx/ghhlJsdrA9tbu+9FhOo93kI8TkRbD8/F 0tsN4HXnYZ97JCQURQfw/MreNEyt+exZlmQuXNKUbnizm1VLIA+TBZkyWxoc9oG7YCWX 3SIcoP1TtuCF5i7fAd4OfVYu54bnnk6Rk8+oqUB33a/67o5UgSyMjJtCcx5xhNAaFUGr w64KUeZen7FCiIeKc21gRIGX6JjCr3lvBQBTO5ZSkP59ZSn2qXSCQ6tyzrkTRnjecGfD WpiKBxE84tyYLkE1yIVT+LH3Lo/oGZ8+Z9qSs8R2WadonEcGwyU3TKZPvIc8rmdlA+au tW6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=cvuRXSxxTWVqkmtsxE0CrdpmjWmu1IaarmSKkWWaisc=; b=gSWh39ZaJqW5TZF1lD7K8tYDeat79Hyhkhz/SEeAE05piO6gvcJOP2FU91a12Ghwoy Q8wOzOj4NW9TLCgaP8l5T9CpQ0rhW+ZQ+Sxmh6MYmML3DnlbBA5CPqeqjrbAOD7jLlat 3kCH8cNLgfm2fjQ2F6fNMJuwgtqpOfa6X23IpamEztL8HRYhlNdPoMAzCtRrgQNWxZsp NcDXXpANzTqi/bWbNia2zDxDmz7WujRjPVfF57OJcB06SGXfXhSk+HV2czF4dhtFAsxt 1slwvm3IymHuEfDfpePx6ggRaM1tapOqNarjlnVEF7mFVvxuxEU7WNFsjKY1ZVUYgb5x NwSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bl4si6179791ejb.579.2020.08.23.12.29.10; Sun, 23 Aug 2020 12:29:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726803AbgHWTNX (ORCPT + 99 others); Sun, 23 Aug 2020 15:13:23 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:40712 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725867AbgHWTNV (ORCPT ); Sun, 23 Aug 2020 15:13:21 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1k9vQS-00BQBj-Id; Sun, 23 Aug 2020 21:13:08 +0200 Date: Sun, 23 Aug 2020 21:13:08 +0200 From: Andrew Lunn To: Sumera Priyadarsini Cc: davem@davemloft.net, Julia.Lawall@lip6.fr, sean.wang@mediatek.com, vivien.didelot@gmail.com, f.fainelli@gmail.com, kuba@kernel.org, matthias.bgg@gmail.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] net: dsa: Add of_node_put() before break statement Message-ID: <20200823191308.GG2588906@lunn.ch> References: <20200823185056.16641-1-sylphrenadin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200823185056.16641-1-sylphrenadin@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c > index 8dcb8a49ab67..e81198a65c26 100644 > --- a/drivers/net/dsa/mt7530.c > +++ b/drivers/net/dsa/mt7530.c > @@ -1327,6 +1327,7 @@ mt7530_setup(struct dsa_switch *ds) > if (phy_node->parent == priv->dev->of_node->parent) { > ret = of_get_phy_mode(mac_np, &interface); > if (ret && ret != -ENODEV) > + of_node_put(mac_np) > return ret; > id = of_mdio_parse_addr(ds->dev, phy_node); > if (id == 0) You are missing some { }. And a ; . I'm surprised gcc did not warn you! Andrew