From: Lucas Stach Date: Tue, 29 May 2012 23:47:13 +0200 Subject: [U-Boot] =?utf-8?q?=5BPATCH_3/3=5D_tegra=3A_usb=3A_fix_wrong_erro?= =?utf-8?q?r_check?= In-Reply-To: <1338328033-8597-1-git-send-email-dev@lynxeye.de> References: <1338328033-8597-1-git-send-email-dev@lynxeye.de> Message-ID: <1338328033-8597-3-git-send-email-dev@lynxeye.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.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 CC: Stephen Warren CC: Tom Warren --- 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