[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1433209514-19082-1-git-send-email-festevam@gmail.com>
Date: Mon, 1 Jun 2015 22:45:14 -0300
From: Fabio Estevam <festevam@...il.com>
To: l.stach@...gutronix.de
Cc: Richard.Zhu@...escale.com, bhelgaas@...gle.com,
linux-kernel@...r.kernel.org,
Fabio Estevam <fabio.estevam@...escale.com>
Subject: [PATCH] PCI: imx6: Return the function value directly
From: Fabio Estevam <fabio.estevam@...escale.com>
Simplify a trivial if-return sequence by returning the
function value directly.
The semantic patch that makes this change is available
in scripts/coccinelle/misc/simple_return.cocci.
Signed-off-by: Fabio Estevam <fabio.estevam@...escale.com>
---
drivers/pci/host/pci-imx6.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
index fdb9536..f28f00d 100644
--- a/drivers/pci/host/pci-imx6.c
+++ b/drivers/pci/host/pci-imx6.c
@@ -115,11 +115,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) */
@@ -146,11 +142,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)
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists