Merge branches 'pci/host-dra7xx', 'pci/host-imx6' and 'pci/host-spear' into next
authorBjorn Helgaas <bhelgaas@google.com>
Mon, 24 Aug 2015 19:15:05 +0000 (14:15 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 24 Aug 2015 19:15:05 +0000 (14:15 -0500)
* pci/host-dra7xx:
  PCI: dra7xx: Remove unneeded use of IS_ERR_VALUE()

* pci/host-imx6:
  PCI: imx6: Simplify a trivial if-return sequence

* pci/host-spear:
  PCI: spear: Use BUG_ON() instead of condition followed by BUG()

1  2  3  4 
drivers/pci/host/pci-dra7xx.c

index 52e2da7b3cd7b6dd09e98710a9794938bd5a1751,190989908a1aba4f51255d3708546caf3df9cffc,80db09e47800dffb017d64177fe00775539d27b0,80db09e47800dffb017d64177fe00775539d27b0..199e29a044cdf26c8194a2475e06034640859265
@@@@@ -396,25 -397,25 -382,9 -382,9 +396,25 @@@@@ static int __init dra7xx_pcie_probe(str
    
        pm_runtime_enable(dev);
        ret = pm_runtime_get_sync(dev);
- --    if (IS_ERR_VALUE(ret)) {
+ ++    if (ret < 0) {
                dev_err(dev, "pm_runtime_get_sync failed\n");
  --            goto err_phy;
  ++            goto err_get_sync;
  ++    }
  ++
  ++    gpio_sel = of_get_gpio_flags(dev->of_node, 0, &flags);
  ++    if (gpio_is_valid(gpio_sel)) {
  ++            gpio_flags = (flags & OF_GPIO_ACTIVE_LOW) ?
  ++                            GPIOF_OUT_INIT_LOW : GPIOF_OUT_INIT_HIGH;
  ++            ret = devm_gpio_request_one(dev, gpio_sel, gpio_flags,
  ++                                        "pcie_reset");
  ++            if (ret) {
  ++                    dev_err(&pdev->dev, "gpio%d request failed, ret %d\n",
  ++                            gpio_sel, ret);
  ++                    goto err_gpio;
  ++            }
  ++    } else if (gpio_sel == -EPROBE_DEFER) {
  ++            ret = -EPROBE_DEFER;
  ++            goto err_gpio;
        }
    
        reg = dra7xx_pcie_readl(dra7xx, PCIECTRL_DRA7XX_CONF_DEVICE_CMD);