Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2888569pxb; Mon, 18 Oct 2021 04:10:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkZG7Izjlboh9+RdqD5sGQTcGSVZDiOlsDfoob547DTXUw7sSBfnMT902E6Q/ebmZSVEPb X-Received: by 2002:a05:6a00:2389:b0:44d:6d57:a38e with SMTP id f9-20020a056a00238900b0044d6d57a38emr28349942pfc.50.1634555434506; Mon, 18 Oct 2021 04:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634555434; cv=none; d=google.com; s=arc-20160816; b=Z5TtombzeWnwPOcsA2TaaM6czIePU8cz2Y1uRV4cGcBA3iDxHc/beCufbrdfxMfzGv Ns7wXMLE4gOd9hrItamCEGmyPN0L37yGR+dIQIPvJsXLYNbEalRBIoVE6rW5aRDZG3KK V9er+qJh/w9QXDIJ0XuMS4TipCR2u0Y0BCdx0PU4OC5ySW+4hshHjMyuTjG32/oSkEmW UlUGBQuFlg2UDm+Ui1LP2Arcy67ka9A/QgQQKjWKI3+FhG5Kfuxd6J9XDs2kS3wRJ1hT smeLzlP/MgrXbq9dhkKNZure2feQM5wOV7KhpIGLHpVpgPUDvkPdEzrjV01PbvNYUHUu ippQ== 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=IuSkCGk5DR3h2FyceoT3ODXOPehRXLA0fOsfoJSOvm4=; b=FOGdxqGWvquVy25hJUE39IvCkEZsPjjrrsFUCUYZyZOKSSs1Qs7OPaR9qP8MXsVzs6 nwoy0896n+xO5vGqWeWkbI5qlgR2vz4s6qdaMfW3gHmCrS/bvJEPZ2w79DJSyxqgGXli N7zvKu8iyVMhMZMEKAnPat8g75mjEGkpSgR+COHaFnEYCbdn14kFZcQUKGGOvva0vSHL 9AevyHuUolKIYfUzEXHldkLBZ9su+sImiUpT/fTbggwzwJR1gJBfJlyJMqJvRcwI29Y1 88pe43/1p2F/gV64Xb/+aGp9ecF9U1VsspiTw+LT9EqFblgxgbgU5dVCQ+r24m37lM+0 ruyQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f23si21959908pgj.268.2021.10.18.04.10.18; Mon, 18 Oct 2021 04:10:34 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230037AbhJRLLL (ORCPT + 99 others); Mon, 18 Oct 2021 07:11:11 -0400 Received: from foss.arm.com ([217.140.110.172]:35624 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbhJRLLK (ORCPT ); Mon, 18 Oct 2021 07:11:10 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 33A1E101E; Mon, 18 Oct 2021 04:08:59 -0700 (PDT) Received: from lpieralisi (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F2D8C3F882; Mon, 18 Oct 2021 04:08:57 -0700 (PDT) Date: Mon, 18 Oct 2021 12:08:52 +0100 From: Lorenzo Pieralisi To: Wan Jiabing Cc: Alyssa Rosenzweig , Marc Zyngier , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, kael_w@yeah.net Subject: Re: [PATCH] PCI: apple: Add of_node_put() before return Message-ID: <20211018110852.GA17623@lpieralisi> References: <20211015080920.17619-1-wanjiabing@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211015080920.17619-1-wanjiabing@vivo.com> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 15, 2021 at 04:09:20AM -0400, Wan Jiabing wrote: > Fix following coccicheck warning: > ./drivers/pci/controller/pcie-apple.c:771:1-23: WARNING: Function > for_each_child_of_node should have of_node_put() before return > > Early exits from for_each_child_of_node should decrement the > node reference counter. > > Signed-off-by: Wan Jiabing > --- > drivers/pci/controller/pcie-apple.c | 1 + > 1 file changed, 1 insertion(+) Squashed in the commit it is fixing, updated my pci/apple branch. Thanks, Lorenzo > > diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c > index b4db7a065553..13101389e988 100644 > --- a/drivers/pci/controller/pcie-apple.c > +++ b/drivers/pci/controller/pcie-apple.c > @@ -772,6 +772,7 @@ static int apple_pcie_init(struct pci_config_window *cfg) > ret = apple_pcie_setup_port(pcie, of_port); > if (ret) { > dev_err(pcie->dev, "Port %pOF setup fail: %d\n", of_port, ret); > + of_node_put(of_port); > return ret; > } > } > -- > 2.20.1 >