summaryrefslogtreecommitdiff
path: root/drivers/pci/host/pcie-rockchip.c
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2017-07-11 13:15:08 +0300
committerBjorn Helgaas <bhelgaas@google.com>2017-07-12 20:50:11 +0300
commit34d5ac2af644a10958e144b7bb937d289dfd158d (patch)
treec6555a764382e85c95106838784dcaf2ed465120 /drivers/pci/host/pcie-rockchip.c
parentf01fc4177352614743ce3fe289687387fcf9e6c6 (diff)
downloadlinux-34d5ac2af644a10958e144b7bb937d289dfd158d.tar.xz
PCI: rockchip: Check for pci_scan_root_bus_bridge() failure correctly
pci_scan_root_bus_bridge() returns zero for success, or a negative errno. A typo in ae13cb9b1926 ("PCI: rockchip: Convert PCI scan API to pci_scan_root_bus_bridge()") treated zero as a failure. Fix the typo. Fixes: ae13cb9b1926 ("PCI: rockchip: Convert PCI scan API to pci_scan_root_bus_bridge()") Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'drivers/pci/host/pcie-rockchip.c')
-rw-r--r--drivers/pci/host/pcie-rockchip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c
index 5acf8694fb23..7bb9870f6d8c 100644
--- a/drivers/pci/host/pcie-rockchip.c
+++ b/drivers/pci/host/pcie-rockchip.c
@@ -1483,7 +1483,7 @@ static int rockchip_pcie_probe(struct platform_device *pdev)
bridge->swizzle_irq = pci_common_swizzle;
err = pci_scan_root_bus_bridge(bridge);
- if (!err)
+ if (err < 0)
goto err_free_res;
bus = bridge->bus;