public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] phy: brcm-sata: fix a timeout test in init
@ 2017-06-19 10:56 Dan Carpenter
  2017-06-20  8:26 ` Vivek Gautam
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2017-06-19 10:56 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: Vivek Gautam, Yendapally Reddy Dhananjaya Reddy, Heiko Stuebner,
	Florian Fainelli, Axel Lin, linux-kernel, kernel-janitors

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>

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)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-20  8:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-19 10:56 [PATCH] phy: brcm-sata: fix a timeout test in init Dan Carpenter
2017-06-20  8:26 ` Vivek Gautam
2017-06-20  8:42   ` Dan Carpenter
2017-06-20  8:56     ` Vivek Gautam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox