aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/pci/controller/cadence/pcie-cadence-host.c
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2020-07-22 16:33:04 +0530
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2020-07-27 15:46:15 +0100
commit19abcd790b51b26d775e1170ba2ac086823cceeb (patch)
tree821f48183d69f7909e99b99879e2fc881e7e6b0a /drivers/pci/controller/cadence/pcie-cadence-host.c
parentPCI: cadence: Use "dma-ranges" instead of "cdns,no-bar-match-nbits" property (diff)
downloadwireguard-linux-19abcd790b51b26d775e1170ba2ac086823cceeb.tar.xz
wireguard-linux-19abcd790b51b26d775e1170ba2ac086823cceeb.zip
PCI: cadence: Fix cdns_pcie_{host|ep}_setup() error path
commit bd22885aa188 ("PCI: cadence: Refactor driver to use as a core library") while refactoring the Cadence PCIe driver to be used as library, removed pm_runtime_get_sync() from cdns_pcie_ep_setup() and cdns_pcie_host_setup() but missed to remove the corresponding pm_runtime_put_sync() in the error path. Fix it here. Link: https://lore.kernel.org/r/20200722110317.4744-3-kishon@ti.com Fixes: bd22885aa188 ("PCI: cadence: Refactor driver to use as a core library") Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/pci/controller/cadence/pcie-cadence-host.c')
-rw-r--r--drivers/pci/controller/cadence/pcie-cadence-host.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/pci/controller/cadence/pcie-cadence-host.c b/drivers/pci/controller/cadence/pcie-cadence-host.c
index 2f599eb62bcf..61161d2de96f 100644
--- a/drivers/pci/controller/cadence/pcie-cadence-host.c
+++ b/drivers/pci/controller/cadence/pcie-cadence-host.c
@@ -8,7 +8,6 @@
#include <linux/of_address.h>
#include <linux/of_pci.h>
#include <linux/platform_device.h>
-#include <linux/pm_runtime.h>
#include "pcie-cadence.h"
@@ -474,7 +473,7 @@ int cdns_pcie_host_setup(struct cdns_pcie_rc *rc)
ret = cdns_pcie_host_init(dev, &resources, rc);
if (ret)
- goto err_init;
+ return ret;
list_splice_init(&resources, &bridge->windows);
bridge->dev.parent = dev;
@@ -492,8 +491,5 @@ int cdns_pcie_host_setup(struct cdns_pcie_rc *rc)
err_host_probe:
pci_free_resource_list(&resources);
- err_init:
- pm_runtime_put_sync(dev);
-
return ret;
}