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: 6944671 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 58FD29F358 for ; Tue, 4 Aug 2015 21:54:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7F42B204E3 for ; Tue, 4 Aug 2015 21:54:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A001020553 for ; Tue, 4 Aug 2015 21:54:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753127AbbHDVyj (ORCPT ); Tue, 4 Aug 2015 17:54:39 -0400 Received: from mail-ig0-f171.google.com ([209.85.213.171]:38201 "EHLO mail-ig0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753049AbbHDVyi (ORCPT ); Tue, 4 Aug 2015 17:54:38 -0400 Received: by iggf3 with SMTP id f3so20780324igg.1 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=HYOz+D3BFtCI21sKXT5CKkOp/3FwMK/CZVG+QnamE3m1keQ4VjB0FSl+OooOtA73+3 T0a5rONq5G1X+8RSm8RBDETGB0kkC7rrvhVUHq/Aumunbb8YfgnsBL0oOluqUxYOE7qY p9Cvihw+l9hHOXfHV890phFI/upl+p599r1zBjGyo9/Addc5exvvQhznZlJmC7JkyrjU G+BPxxdRBj63rcqgaAlvc5pvbuLrxWGu+AoV6qnx6E95QB5o7vP3n7AfOOCfu3eiCCf/ hMFoi6z24G0dDb+wMrjInLBHTGneP05f8BXbBddwy6JHSF1lyIQ7+GdXyN5K6bC0ns7E Q0tg== X-Gm-Message-State: ALoCoQmhLzOoGuPE/IYIT7vTkTz5DJo0m7QwbUKo/OT4XDGZ+7PyEfy1Ugmh/7xQRhZALVFXCDwN 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 Cc: Thomas Petazzoni , Jayachandran C , Pratyush Anand , Russell King , Arnd Bergmann , Gabriele Paoloni , Marc Zyngier , linux-pci@vger.kernel.org, Duc Dang , Michal Simek , Simon Horman , James Morse , Tanmay Inamdar , Jingoo Han , Thierry Reding , linux-arm-kernel@lists.infradead.org, Jason Cooper 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 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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(+) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }