summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-06-19 12:56:05 +0200
committerKishon Vijay Abraham I <kishon@ti.com>2017-08-22 06:41:27 +0200
commitd9c51f4c53ae2af03aa8bd001d46f21b0adcdab8 (patch)
treee303f8717176d806d6a9c81c846deb11553b49b1
parentphy: cpcap-usb: remove a stray tab (diff)
downloadlinux-d9c51f4c53ae2af03aa8bd001d46f21b0adcdab8.tar.xz
linux-d9c51f4c53ae2af03aa8bd001d46f21b0adcdab8.zip
phy: brcm-sata: fix a timeout test in init
We want to timeout with try set to zero so this should be a pre-op instead of post-op. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
-rw-r--r--drivers/phy/broadcom/phy-brcm-sata.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/phy/broadcom/phy-brcm-sata.c b/drivers/phy/broadcom/phy-brcm-sata.c
index e6544c8b1ace..9d7f74fe3d7c 100644
--- a/drivers/phy/broadcom/phy-brcm-sata.c
+++ b/drivers/phy/broadcom/phy-brcm-sata.c
@@ -335,7 +335,7 @@ static int brcm_nsp_sata_init(struct brcm_sata_port *port)
/* Wait for pll_seq_done bit */
try = 50;
- while (try--) {
+ while (--try) {
val = brcm_sata_phy_rd(base, BLOCK0_REG_BANK,
BLOCK0_XGXSSTATUS);
if (val & BLOCK0_XGXSSTATUS_PLL_LOCK)