Skip to content
Browse files

pci: xdma: pl: Remove of_pci_get_host_bridge_resources

of_pci_get_host_bridge_resources() allocates the resource structures it
fills dynamically but these resources are not released.
So convert the existing function to a managed
version, devm_of_pci_get_host_bridge_resources().

Signed-off-by: Bharat Kumar Gogada <>
Signed-off-by: Michal Simek <>
  • Loading branch information...
Bharat Kumar Gogada authored and michalsimek committed May 20, 2019
1 parent 8e85861 commit bc110c1e7da48439835265a0fbe9f8fc57cad752
Showing with 4 additions and 2 deletions.
  1. +4 −2 drivers/pci/controller/pcie-xdma-pl.c
@@ -22,6 +22,8 @@
#include <linux/platform_device.h>
#include <linux/irqchip/chained_irq.h>

#include "../pci.h"

/* Register definitions */
#define XILINX_PCIE_REG_VSEC 0x0000012c
#define XILINX_PCIE_REG_BIR 0x00000130
@@ -757,8 +759,8 @@ static int xilinx_pcie_probe(struct platform_device *pdev)
return err;

err = of_pci_get_host_bridge_resources(dev->of_node, 0, 0xff, &res,
err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff, &res,
if (err) {
dev_err(dev, "Getting bridge resources failed\n");
return err;

0 comments on commit bc110c1

Please sign in to comment.
You can’t perform that action at this time.