Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1711695ybm; Thu, 23 May 2019 05:43:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxg8vHgFeKPOdie6x0WL06T/zyfuXfODNuS2H0zyxlub0zkPvHBmL49cJu0tF39jn/YTsTI X-Received: by 2002:a17:902:e48d:: with SMTP id cj13mr98395151plb.156.1558615390504; Thu, 23 May 2019 05:43:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558615390; cv=none; d=google.com; s=arc-20160816; b=UoD8/sMI2PkonVy0OHFSV1AAEEEL09bgzjaq/i6vut64cq9Yqe3B1GeWCRvacMddJp LO7d/wRXsb61ntNMhGXxOiOmSbAuDH8zgIBjes+g/1cFEEMm7voaul3FS81jO2Mp34fN +SH1fel69/I4W0afFle4whxgPgKZJxFrOhqlBuuSNRvJCKo4hHjRwMRIFVDWtHJZQqZD BpUHKDRTbiRW66JQhJCBo93KbAHfEtEkRNHoEbBpM+O5eIjxkcCIvjCqqaJBaWxBHT9D me1K/ZQpOtsgcNW1hvk/L2a0k8k3E8Bq8zixb17rrJ2MVGK3KH6Y+Qgg9q8e2WJW7piN Qs8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QIIk5nRslAP3biuNIT6xUn1gJ9i4l0lvEaG4v7awNx0=; b=JhoTKS8XJRjCjyyv7NWR6MDsGkreHVfgKX8fpKuVspqJfvW96SJLUA6MA0haOBhFKk F4wcsZ3ggdDsO4MNxMXflBhDejd8ReeCs5G4vttVNiqJNByje1sL5baf3Pa1rRLYem3v f9SLU3H/arXofnO2b8rSkKPonaClVn4gEBGjn8AfedtXdBjafxhig8RHH43Y7MRQcVXM wu/egpS513TpMEyMQFesUBXcTBS/+OPwNF3zNa353asELrZg/R6cugXhOgxYPNhoWb1o gMz5pE6vmrPVtGvcNOEwVzieVD9X3QuFl05Zd8tLxGVeciNQRU/n/Rn7rgWZIe0ZmJ8F ujdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Sf0qK/Jb"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n88si406430pjc.7.2019.05.23.05.42.53; Thu, 23 May 2019 05:43:10 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b="Sf0qK/Jb"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730323AbfEWMlr (ORCPT + 99 others); Thu, 23 May 2019 08:41:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:51782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729698AbfEWMlq (ORCPT ); Thu, 23 May 2019 08:41:46 -0400 Received: from dragon (98.142.130.235.16clouds.com [98.142.130.235]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 00F0D21019; Thu, 23 May 2019 12:41:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558615305; bh=uLiCmPuCEnBoRJ3UmlA97AkB8XpLW5+DYpKD1xKSb+0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Sf0qK/JbYPEsgAwjfRune+wYwde36fZsui36KPpmdbm1RdfARGuZbwLLji5pVlPsl 3MSGG+NpjYNqc0sb0RVXqyjl2y7B6SIcG3pU0pdAg2vzsBEy6kqXGUcFjP8wC8eC2j m37q0iGfLMCyCLVYAZQhMeZfXqnws9ShXKpDZePs= Date: Thu, 23 May 2019 20:40:45 +0800 From: Shawn Guo To: Anson Huang Cc: "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , Leonard Crestez , Abel Vesa , "viresh.kumar@linaro.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx Subject: Re: [PATCH 1/2] soc: imx: soc-imx8: Avoid unnecessary of_node_put() in error handling Message-ID: <20190523124044.GT9261@dragon> References: <1558430013-18346-1-git-send-email-Anson.Huang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1558430013-18346-1-git-send-email-Anson.Huang@nxp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 21, 2019 at 09:18:43AM +0000, Anson Huang wrote: > of_node_put() is called after of_match_node() successfully called, > then in the following error handling, of_node_put() is called again > which is unnecessary, this patch adjusts the location of of_node_put() > to avoid such scenario. > > Signed-off-by: Anson Huang Again, there are '=20' in the patch content and I cannot apply it. Shawn > --- > drivers/soc/imx/soc-imx8.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/soc/imx/soc-imx8.c b/drivers/soc/imx/soc-imx8.c > index b1bd8e2..944add2 100644 > --- a/drivers/soc/imx/soc-imx8.c > +++ b/drivers/soc/imx/soc-imx8.c > @@ -86,8 +86,6 @@ static int __init imx8_soc_init(void) > if (!id) > goto free_soc; > > - of_node_put(root); > - > data = id->data; > if (data) { > soc_dev_attr->soc_id = data->name; > @@ -106,6 +104,8 @@ static int __init imx8_soc_init(void) > if (IS_ENABLED(CONFIG_ARM_IMX_CPUFREQ_DT)) > platform_device_register_simple("imx-cpufreq-dt", -1, NULL, 0); > > + of_node_put(root); > + > return 0; > > free_rev: > -- > 2.7.4 >