Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp3766339imc; Sun, 24 Feb 2019 12:34:45 -0800 (PST) X-Google-Smtp-Source: AHgI3Ib9lur6Mwk5MXo2YOslJvPUBuvQ2z7I1VUf8zbbp93Ia53GyEOAIQcl5EDUo+pLgLpTZVB7 X-Received: by 2002:a65:50cc:: with SMTP id s12mr10564837pgp.130.1551040485266; Sun, 24 Feb 2019 12:34:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551040485; cv=none; d=google.com; s=arc-20160816; b=ipZMNsfx+IX5eroEgudYEbXWkbWIRCQSEDd/KRC++CDF1I4+Ps85lGVgwul/O6CYnI sTG8wuujdD/rXkb73l8mZyHdNPMiFLcYfzcY9WeIjC8LGOpteIEU6WTs314AcLybmiMS EjKeh92syyiPBxaqK3qAV/A5rdGEuQCGBz08u8LW12IBtu0HpijgG7IP2IzZm36F9Df1 VgmFMzRzHgkVHKuef8dQhC731sk+YQ7z/ZHxNFTH6jy+7pOA5P/WwirYb02pz0mnAHA4 ojW6egvIY3MF3kQ4wJwMgRYckzLSmAs1jViiJFO4Y/RvLjn7KXPTRsTPsDYsGylfLn1C gj0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=+Jr12IbendXFvHPpZRoOHUYyfeKoG6Tj64mSY1wtgjA=; b=fu4tEtcmQOBbOV6AXRPDt9WY0/kcpB+Vm9mMlRfycqSPvgQAEHUTBPz6EOLuww5CT5 XfyEVrPm9R95QRCVYQ3XqGVZxHZ5wskCSZ4jvnrt/apHkUT7NhXSBG0xzIRGF/ydjfin S03DfWQeeezHh5k7+folSONFv6Z9NYyHZQBo/bXqSjKXkqsf+4NLqJHEOpyb+yQ6LPP7 AVMNYS+oWrgPyAiFcIy4IpKAZDh9WqOeZrE/DZYqANckORF0WFH8BXskd2iYs0AzCnKi rz4PI5RZPq2sBNE3bdgKzu1flaLKzJGoCJcu5b4zqlrTKrEmEHBBTQFJ/ozKq4SpRPZE 0gGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l71si6274750pgd.529.2019.02.24.12.34.30; Sun, 24 Feb 2019 12:34:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728348AbfBXUcd (ORCPT + 99 others); Sun, 24 Feb 2019 15:32:33 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:59624 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726458AbfBXUcc (ORCPT ); Sun, 24 Feb 2019 15:32:32 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::bf5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 3810B14CFB314; Sun, 24 Feb 2019 12:32:31 -0800 (PST) Date: Sun, 24 Feb 2019 12:32:30 -0800 (PST) Message-Id: <20190224.123230.261167641058555597.davem@davemloft.net> To: wen.yang99@zte.com.cn Cc: linus.walleij@linaro.org, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com, nbd@nbd.name, lorenzo.bianconi83@gmail.com, kvalo@codeaurora.org, matthias.bgg@gmail.com, linux-wireless@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, anirudh@xilinx.com, John.Linn@xilinx.com, michal.simek@xilinx.com, wang.yi59@zte.com.cn Subject: Re: [PATCH 5/5] net: dsa: fix a leaked reference by adding missing of_node_put From: David Miller In-Reply-To: <1550819742-32155-5-git-send-email-wen.yang99@zte.com.cn> References: <1550819742-32155-1-git-send-email-wen.yang99@zte.com.cn> <1550819742-32155-5-git-send-email-wen.yang99@zte.com.cn> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 24 Feb 2019 12:32:31 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wen Yang Date: Fri, 22 Feb 2019 15:15:42 +0800 > diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c > index 8c431e0..89823f0 100644 > --- a/net/dsa/dsa2.c > +++ b/net/dsa/dsa2.c > @@ -613,7 +613,7 @@ static int dsa_switch_parse_ports_of(struct dsa_switch *ds, > struct device_node *ports, *port; > struct dsa_port *dp; > u32 reg; > - int err; > + int err = 0; Please preserve the reverse christmas tree ordering of variables here. Thank you.