aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-08-20 02:31:58 -0400
committerBjorn Helgaas <bhelgaas@google.com>2015-08-20 02:31:58 -0400
commit8d1ceb52e110aec808d64973f90fe4f69a5e42e9 (patch)
treed567352d0df1acbb614a02d6bfde145db9419eb3
parentbc0195aad0daa2ad5b0d76cce22b167bc3435590 (diff)
PCI: imx6: Simplify a trivial if-return sequence
Simplify a trivial if-return sequence by combining it with a preceding function call. The semantic patch that makes this change is available in scripts/coccinelle/misc/simple_return.cocci. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: Lucas Stach <l.stach@pengutronix.de>
-rw-r--r--drivers/pci/host/pci-imx6.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
index 233a196c6e66..8f3a9813c4e5 100644
--- a/drivers/pci/host/pci-imx6.c
+++ b/drivers/pci/host/pci-imx6.c
@@ -117,11 +117,7 @@ static int pcie_phy_wait_ack(void __iomem *dbi_base, int addr)
117 val = addr << PCIE_PHY_CTRL_DATA_LOC; 117 val = addr << PCIE_PHY_CTRL_DATA_LOC;
118 writel(val, dbi_base + PCIE_PHY_CTRL); 118 writel(val, dbi_base + PCIE_PHY_CTRL);
119 119
120 ret = pcie_phy_poll_ack(dbi_base, 0); 120 return pcie_phy_poll_ack(dbi_base, 0);
121 if (ret)
122 return ret;
123
124 return 0;
125} 121}
126 122
127/* Read from the 16-bit PCIe PHY control registers (not memory-mapped) */ 123/* Read from the 16-bit PCIe PHY control registers (not memory-mapped) */
@@ -148,11 +144,7 @@ static int pcie_phy_read(void __iomem *dbi_base, int addr , int *data)
148 /* deassert Read signal */ 144 /* deassert Read signal */
149 writel(0x00, dbi_base + PCIE_PHY_CTRL); 145 writel(0x00, dbi_base + PCIE_PHY_CTRL);
150 146
151 ret = pcie_phy_poll_ack(dbi_base, 0); 147 return pcie_phy_poll_ack(dbi_base, 0);
152 if (ret)
153 return ret;
154
155 return 0;
156} 148}
157 149
158static int pcie_phy_write(void __iomem *dbi_base, int addr, int data) 150static int pcie_phy_write(void __iomem *dbi_base, int addr, int data)