From patchwork Tue Aug 4 21:54:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 6944741 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 52C4AC05AC for ; Tue, 4 Aug 2015 21:57:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 836E62056E for ; Tue, 4 Aug 2015 21:57:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 416FF2053C for ; Tue, 4 Aug 2015 21:57:31 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZMkAr-00016d-GA; Tue, 04 Aug 2015 21:55:05 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZMkAp-0000vl-3q for linux-arm-kernel@bombadil.infradead.org; Tue, 04 Aug 2015 21:55:03 +0000 Received: from mail-ig0-x22f.google.com ([2607:f8b0:4001:c05::22f]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZMkAm-0007OM-B7 for linux-arm-kernel@lists.infradead.org; Tue, 04 Aug 2015 21:55:01 +0000 Received: by igbpg9 with SMTP id pg9so102571738igb.0 for ; Tue, 04 Aug 2015 14:54:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=UfjJW4SR+vQ+W6KKlcUuGfNM7uayUZ/dRqCav5ByHyE=; b=J5kANChb8pzbwjRBtS5kil3nZDX01x9l3oQwvn1qAysS0sXBwPWGJtyf34Ch0XwhVx onCMv3NCG9eI+KGVW6hl6E12aahzCLMHK//7bcXRdwIHs0VCoj7X/6iECw6NJ3kxrRFb /wbG4WaJkqqG24JhykeVTJu+rcz+TrefTyBSbGRnF/yio7zI8JiC+xIZ9iKTDUMMoFf9 Klvkg1nwACJFMKX+BVvygfkHo0BoQigIYOVyif86MQPDVIlmCIdUYG2enJCtVat4I+DA dsqLJ1NEbcIQKJ2ZS2sVYd/4sGvLGEMSiLF2eSteHx1LqhDsE+MPMQlpEo3sBJ8XlLgN NSog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=UfjJW4SR+vQ+W6KKlcUuGfNM7uayUZ/dRqCav5ByHyE=; b=h6a5kPM9w5i+ttn7jVfjqAF7XPrOlK4RGOrtf3Z4ChmTw5/xLqzkla4uhVaX+ZXOYX ZHLeP0cFQ38eigxDgWBh4OiPOaJafiE8Z+hyU495sYXlA5M8x1fPxjEEkFaVoEub1nRC 1wF23ZxAy0JqMPzHU9CNPZ4of8PoK4hIaDefksCn4/zPh4aJh1ldkbGNb6KNjbO22ERQ Be6RX3ktQjTHo0zJAT8oR4A6NfRGbhGAppoOxMi/aMbyDL/wsFuzlD3FoU4cLzC2kvx4 +raeO+6dtssUg51O//yb7G8+3tt13DkAsqs6HdTg6IKtD9O9D25ukYAQdgtaCUrU2qkD qWHg== X-Gm-Message-State: ALoCoQmiQmfHLZGXcHWY0M3rhE3ETF2epGzjISH1MFn2UG5inckCKn4Zpdb0BwagzjIW5saEh4F/ X-Received: by 10.50.122.41 with SMTP id lp9mr6600449igb.56.1438725277745; Tue, 04 Aug 2015 14:54:37 -0700 (PDT) Received: from localhost ([69.71.1.1]) by smtp.gmail.com with ESMTPSA id g9sm790810igg.5.2015.08.04.14.54.36 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 04 Aug 2015 14:54:36 -0700 (PDT) Subject: [PATCH v5 6/9] PCI: Drop references acquired by of_parse_phandle() To: Lorenzo Pieralisi From: Bjorn Helgaas Date: Tue, 04 Aug 2015 16:54:35 -0500 Message-ID: <20150804215435.9189.94410.stgit@bhelgaas-glaptop2.roam.corp.google.com> In-Reply-To: <20150804214234.9189.42548.stgit@bhelgaas-glaptop2.roam.corp.google.com> References: <20150804214234.9189.42548.stgit@bhelgaas-glaptop2.roam.corp.google.com> User-Agent: StGit/0.16 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150804_225500_538639_A38AAE6D X-CRM114-Status: GOOD ( 14.22 ) X-Spam-Score: -2.9 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Duc Dang , Russell King , Arnd Bergmann , Gabriele Paoloni , Marc Zyngier , linux-pci@vger.kernel.org, Pratyush Anand , Michal Simek , Simon Horman , James Morse , Tanmay Inamdar , Jingoo Han , Thierry Reding , Jayachandran C , linux-arm-kernel@lists.infradead.org, Jason Cooper Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP of_parse_phandle() returns a device_node pointer with the refcount incremented. We should dispose of this reference when we're finished. Drop the reference acquired by of_parse_phandle(). Signed-off-by: Bjorn Helgaas Reviewed-by: Lorenzo Pieralisi --- drivers/pci/host/pci-mvebu.c | 1 + drivers/pci/host/pci-xgene.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index 70aa095..67ec5e1 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c @@ -879,6 +879,7 @@ static void mvebu_pcie_msi_enable(struct mvebu_pcie *pcie) return; pcie->msi = of_pci_find_msi_chip_by_node(msi_node); + of_node_put(msi_node); if (pcie->msi) pcie->msi->dev = &pcie->pdev->dev; diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c index a9dfb70..4c2fb1f 100644 --- a/drivers/pci/host/pci-xgene.c +++ b/drivers/pci/host/pci-xgene.c @@ -514,6 +514,7 @@ static int xgene_pcie_msi_enable(struct pci_bus *bus) if (!bus->msi) return -ENODEV; + of_node_put(msi_node); bus->msi->dev = &bus->dev; return 0; }