public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lucas Stach <dev@lynxeye.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] tegra: usb: fix wrong error check
Date: Tue, 29 May 2012 23:47:13 +0200	[thread overview]
Message-ID: <1338328033-8597-3-git-send-email-dev@lynxeye.de> (raw)
In-Reply-To: <1338328033-8597-1-git-send-email-dev@lynxeye.de>

Just stumbled upon this, while looking through the usb code. loop_count
runs down from 10000, so the correct condition to error out is ==0.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
CC: Stephen Warren <swarren@wwwdotorg.org>
CC: Tom Warren <twarren.nvidia@gmail.com>
---
 arch/arm/cpu/armv7/tegra2/usb.c |    2 +-
 1 Datei ge?ndert, 1 Zeile hinzugef?gt(+), 1 Zeile entfernt(-)

diff --git a/arch/arm/cpu/armv7/tegra2/usb.c b/arch/arm/cpu/armv7/tegra2/usb.c
index c80de7f..5f2b243 100644
--- a/arch/arm/cpu/armv7/tegra2/usb.c
+++ b/arch/arm/cpu/armv7/tegra2/usb.c
@@ -290,7 +290,7 @@ static int init_usb_controller(struct fdt_usb *config,
 			break;
 		udelay(1);
 	}
-	if (loop_count == 100000)
+	if (!loop_count)
 		return -1;
 
 	return 0;
-- 
1.7.10.2

  parent reply	other threads:[~2012-05-29 21:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-29 21:47 [U-Boot] [PATCH 1/3] tegra: add a method to query RAM size from hardware Lucas Stach
2012-05-29 21:47 ` [U-Boot] [PATCH 2/3] tegra: add ULPI on USB2 funcmux entry Lucas Stach
2012-05-29 22:16   ` Stephen Warren
2012-05-29 21:47 ` Lucas Stach [this message]
2012-05-29 22:18   ` [U-Boot] [PATCH 3/3] tegra: usb: fix wrong error check Stephen Warren
2012-05-29 23:20     ` Tom Warren
2012-05-29 22:12 ` [U-Boot] [PATCH 1/3] tegra: add a method to query RAM size from hardware Stephen Warren
2012-05-29 23:19   ` Tom Warren
2012-05-29 23:47     ` Stephen Warren
2012-05-30 16:04       ` Tom Warren
2012-05-30 16:37         ` Stephen Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1338328033-8597-3-git-send-email-dev@lynxeye.de \
    --to=dev@lynxeye.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox