Browse Source

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>
Dan Carpenter 8 years ago
parent
commit
d9c51f4c53
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/phy/broadcom/phy-brcm-sata.c

+ 1 - 1
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)