Re: [PATCH v5 6/9] PCI: Drop references acquired by of_parse_phandle()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 04, 2015 at 10:54:35PM +0100, Bjorn Helgaas wrote:
> 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 <bhelgaas@xxxxxxxxxx>
> ---
>  drivers/pci/host/pci-mvebu.c |    1 +
>  drivers/pci/host/pci-xgene.c |    1 +
>  2 files changed, 2 insertions(+)

It looks fine to me:

Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>

> 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;
>  }
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux