Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp855246imm; Fri, 29 Jun 2018 07:30:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJSTkBnll2nUwFCPFQDSIh72JXTszu2gFONBsCcCtIUMrEe58dOVQj6MI/9uWPxwKqE15oV X-Received: by 2002:a17:902:2983:: with SMTP id h3-v6mr15190170plb.232.1530282601498; Fri, 29 Jun 2018 07:30:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530282601; cv=none; d=google.com; s=arc-20160816; b=xjuVhOZ/0E5B8jhceyG3kVv+r7I9tPuQn+fFpvs0OnWWqWTHNqZrrQL2UwIVyrEPM6 tW86oIiPphayzlF7R+M7qN+yS44eGx2k0sMgNHQj7Y9BM07oj6CMx8E161Xby2ZTEmlb m4qJO8hCrClcGiwg+C3x+rWx6IhmwpuSaNGINqAtv1UEE9dypJ45AitIjt+sAtA6WegU IsxUGWfLpLbkFeyJuaMZihdDy5POJuAwX5XxZwXrM0M4ppiDujOduXCj1QTpQJWL+yuI rDitQ/FhSPU/jbyAbVLTGuZw4AL21v2hdoYR7LBeP14DUtAUjhx2jubfqOWe7Yur0kij POFQ== 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:arc-authentication-results; bh=qTosUYgGbhEdoXEbW8KNympfkYPrwPfvwyYx/VGAufw=; b=O2teDAD7ppG5TgAFdNcpCcqFc792niAtkSdYA/IPzsvg65SrCMoFf/iRDrCYmRCdbG QjI+7aFsxPyTN7Iza8ms/S8G54fs5wbQCRD3jHetAE1NQauCD74u7LS1sjdXQYFESwdY Ho8fbEEBljBrpuVV0wHCu6PFCP/I/CF150m5wdKdUUL9XnHgF1FKtIjGE80ClesRTkWp R0o+lO5YRifEHZ37cLrlnSRBHuQZcuBuE3YvGIFcXO43DwdOD7qe2GxMj7JwkVNErehA cndoYpLyrbdIClqAGr2Rd0fFt73WeXg4hWhhJVdkruMFazaKGgNVG5TbF02ICFPD+d5T n7Pw== 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 b184-v6si9164513pfa.167.2018.06.29.07.29.47; Fri, 29 Jun 2018 07:30:01 -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; 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 S936600AbeF2Nmi (ORCPT + 99 others); Fri, 29 Jun 2018 09:42:38 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:34598 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935810AbeF2Nmg (ORCPT ); Fri, 29 Jun 2018 09:42:36 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3507D80D; Fri, 29 Jun 2018 06:42:36 -0700 (PDT) Received: from red-moon (unknown [10.1.206.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 27E973F5C0; Fri, 29 Jun 2018 06:42:35 -0700 (PDT) Date: Fri, 29 Jun 2018 14:44:23 +0100 From: Lorenzo Pieralisi To: Nicholas Mc Guire Cc: Linus Walleij , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: faraday: add missing of_node_put() Message-ID: <20180629134423.GF9643@red-moon> References: <1529766899-1994-1-git-send-email-hofrat@osadl.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1529766899-1994-1-git-send-email-hofrat@osadl.org> 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 Sat, Jun 23, 2018 at 05:14:59PM +0200, Nicholas Mc Guire wrote: > The call to of_get_next_child() returns a node pointer with refcount > incremented thus it must be explicitly decremented here in the error > path and after the last usage. > > Signed-off-by: Nicholas Mc Guire > Fixes: commit d3c68e0a7e34 ("PCI: faraday: Add Faraday Technology FTPCI100 PCI Host Bridge driver") > --- > > Patch found my experimental coccinelle script > > Patch was compile tested with: gemini_defconfig (implies CONFIG_PCI_FTPCI100=y) > > Patch is against 4.18-rc1 (localversion-next is next-20180621) > > drivers/pci/controller/pci-ftpci100.c | 2 ++ > 1 file changed, 2 insertions(+) Applied to pci/controller-fixes to be tentatively merged for -rc4, thanks. Lorenzo > diff --git a/drivers/pci/controller/pci-ftpci100.c b/drivers/pci/controller/pci-ftpci100.c > index a1ebe9e..20bb256 100644 > --- a/drivers/pci/controller/pci-ftpci100.c > +++ b/drivers/pci/controller/pci-ftpci100.c > @@ -355,11 +355,13 @@ static int faraday_pci_setup_cascaded_irq(struct faraday_pci *p) > irq = of_irq_get(intc, 0); > if (irq <= 0) { > dev_err(p->dev, "failed to get parent IRQ\n"); > + of_node_put(intc); > return irq ?: -EINVAL; > } > > p->irqdomain = irq_domain_add_linear(intc, PCI_NUM_INTX, > &faraday_pci_irqdomain_ops, p); > + of_node_put(intc); > if (!p->irqdomain) { > dev_err(p->dev, "failed to create Gemini PCI IRQ domain\n"); > return -EINVAL; > -- > 2.1.4 >