tegra: Report errors from PCI init
authorSimon Glass <sjg@chromium.org>
Sun, 17 Jan 2016 21:51:55 +0000 (14:51 -0700)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 28 Jan 2016 18:32:44 +0000 (12:32 -0600)
This function can fail, so be sure to report any errors that occur.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/pci/pci_tegra.c

index 5a7fefed5e1525e6d942a8e36a9d21b70e4dd3a1..5dadf6fa62a7b4881b2dacdfb5ca02eee26a69ba 100644 (file)
@@ -465,7 +465,11 @@ static int tegra_pcie_parse_dt(const void *fdt, int node, enum tegra_pci_id id,
                return err;
        }
 
-       tegra_pcie_board_init();
+       err = tegra_pcie_board_init();
+       if (err < 0) {
+               error("tegra_pcie_board_init() failed: err=%d", err);
+               return err;
+       }
 
        pcie->phy = tegra_xusb_phy_get(TEGRA_XUSB_PADCTL_PCIE);
        if (pcie->phy) {