Skip to content

Commit

Permalink
Merge branches 'pci/host-dra7xx', 'pci/host-imx6' and 'pci/host-spear…
Browse files Browse the repository at this point in the history
…' into next

* 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()
  • Loading branch information
bjorn-helgaas committed Aug 24, 2015
4 parents f0d9ac7 + d3f4caa + 8d1ceb5 + 68ebb7c commit 2fc32c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion drivers/pci/host/pci-dra7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev)

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_get_sync;
}
Expand Down
12 changes: 2 additions & 10 deletions drivers/pci/host/pci-imx6.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,7 @@ static int pcie_phy_wait_ack(void __iomem *dbi_base, int addr)
val = addr << PCIE_PHY_CTRL_DATA_LOC;
writel(val, dbi_base + PCIE_PHY_CTRL);

ret = pcie_phy_poll_ack(dbi_base, 0);
if (ret)
return ret;

return 0;
return pcie_phy_poll_ack(dbi_base, 0);
}

/* Read from the 16-bit PCIe PHY control registers (not memory-mapped) */
Expand All @@ -148,11 +144,7 @@ static int pcie_phy_read(void __iomem *dbi_base, int addr , int *data)
/* deassert Read signal */
writel(0x00, dbi_base + PCIE_PHY_CTRL);

ret = pcie_phy_poll_ack(dbi_base, 0);
if (ret)
return ret;

return 0;
return pcie_phy_poll_ack(dbi_base, 0);
}

static int pcie_phy_write(void __iomem *dbi_base, int addr, int data)
Expand Down
3 changes: 1 addition & 2 deletions drivers/pci/host/pcie-spear13xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ static irqreturn_t spear13xx_pcie_irq_handler(int irq, void *arg)
status = readl(&app_reg->int_sts);

if (status & MSI_CTRL_INT) {
if (!IS_ENABLED(CONFIG_PCI_MSI))
BUG();
BUG_ON(!IS_ENABLED(CONFIG_PCI_MSI));
dw_handle_msi_irq(pp);
}

Expand Down

0 comments on commit 2fc32c9

Please sign in to comment.