summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-09-21 21:10:53 +0800
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2020-10-02 12:52:37 +0100
commit9aae3af8767cdfbdcb2d59c008b9477e82ab1029 (patch)
treeae518e85ef96406ecbba2c27b696ce7e5dbefbc6 /drivers/pci
parentc7e592a6a5413c780f846d9b053fb132fedb63b8 (diff)
PCI: cadence: Simplify cdns_pcie_host_init_address_translation() return expression
Simplify the return expression. Link: https://lore.kernel.org/r/20200921131053.92752-1-miaoqinglang@huawei.com Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/controller/cadence/pcie-cadence-host.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/pci/controller/cadence/pcie-cadence-host.c b/drivers/pci/controller/cadence/pcie-cadence-host.c
index 4550e0d469ca..811c1cb2e8de 100644
--- a/drivers/pci/controller/cadence/pcie-cadence-host.c
+++ b/drivers/pci/controller/cadence/pcie-cadence-host.c
@@ -337,7 +337,7 @@ static int cdns_pcie_host_init_address_translation(struct cdns_pcie_rc *rc)
struct resource_entry *entry;
u64 cpu_addr = cfg_res->start;
u32 addr0, addr1, desc1;
- int r, err, busnr = 0;
+ int r, busnr = 0;
entry = resource_list_first_type(&bridge->windows, IORESOURCE_BUS);
if (entry)
@@ -383,11 +383,7 @@ static int cdns_pcie_host_init_address_translation(struct cdns_pcie_rc *rc)
r++;
}
- err = cdns_pcie_host_map_dma_ranges(rc);
- if (err)
- return err;
-
- return 0;
+ return cdns_pcie_host_map_dma_ranges(rc);
}
static int cdns_pcie_host_init(struct device *dev,