PCI: cadence: Fix cdns_pcie_{host|ep}_setup() error path
authorKishon Vijay Abraham I <kishon@ti.com>
Wed, 22 Jul 2020 11:03:04 +0000 (16:33 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:24:00 +0000 (08:24 +0200)
commitf8eaf30688e6ac4cf872c459dc589591600b7b26
tree85011d55bd680d73d0b31958f18e603a3df9b133
parentf4cbaae61a99426b593129a1f5bcc182a1cbdb9c
PCI: cadence: Fix cdns_pcie_{host|ep}_setup() error path

[ Upstream commit 19abcd790b51b26d775e1170ba2ac086823cceeb ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/cadence/pcie-cadence-ep.c
drivers/pci/controller/cadence/pcie-cadence-host.c