summaryrefslogtreecommitdiffstats
path: root/drivers/phy
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-06-19 13:56:05 +0300
committerKishon Vijay Abraham I <kishon@ti.com>2017-08-22 10:11:27 +0530
commitd9c51f4c53ae2af03aa8bd001d46f21b0adcdab8 (patch)
treee303f8717176d806d6a9c81c846deb11553b49b1 /drivers/phy
parentaea430ee0c4228b00e4ad303ff63dec93285b3e8 (diff)
downloadlinux-d9c51f4c53ae2af03aa8bd001d46f21b0adcdab8.tar.bz2
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>
Diffstat (limited to 'drivers/phy')
-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)