[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170619105251.GA23911@elgon.mountain>
Date: Mon, 19 Jun 2017 13:56:05 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Kishon Vijay Abraham I <kishon@...com>
Cc: Vivek Gautam <vivek.gautam@...eaurora.org>,
Yendapally Reddy Dhananjaya Reddy
<yendapally.reddy@...adcom.com>, Heiko Stuebner <heiko@...ech.de>,
Florian Fainelli <f.fainelli@...il.com>,
Axel Lin <axel.lin@...ics.com>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [PATCH] 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@...cle.com>
diff --git a/drivers/phy/broadcom/phy-brcm-sata.c b/drivers/phy/broadcom/phy-brcm-sata.c
index ccbc3d994998..48fb016ce689 100644
--- a/drivers/phy/broadcom/phy-brcm-sata.c
+++ b/drivers/phy/broadcom/phy-brcm-sata.c
@@ -329,7 +329,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)
Powered by blists - more mailing lists