From patchwork Thu May 31 11:51:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lucas Stach X-Patchwork-Id: 162142 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id B4EF3B6FC5 for ; Thu, 31 May 2012 21:51:24 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 85C30280D7; Thu, 31 May 2012 13:51:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jqpMRZCqpq5T; Thu, 31 May 2012 13:51:22 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AB751280D9; Thu, 31 May 2012 13:51:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CCCF5280DA for ; Thu, 31 May 2012 13:51:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EAittRysbqRB for ; Thu, 31 May 2012 13:51:18 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from km20343-01.keymachine.de (ns.km20343-01.keymachine.de [84.19.182.79]) by theia.denx.de (Postfix) with ESMTPS id 3EAC8280D7 for ; Thu, 31 May 2012 13:51:16 +0200 (CEST) Received: from localhost.localdomain (f053080230.adsl.alicedsl.de [78.53.80.230]) by km20343-01.keymachine.de (Postfix) with ESMTPA id 323927D4419; Thu, 31 May 2012 13:51:16 +0200 (CEST) From: Lucas Stach To: u-boot@lists.denx.de Date: Thu, 31 May 2012 13:51:02 +0200 Message-Id: <1338465062-30660-2-git-send-email-dev@lynxeye.de> X-Mailer: git-send-email 1.7.10.2 In-Reply-To: <1338465062-30660-1-git-send-email-dev@lynxeye.de> References: <1338465062-30660-1-git-send-email-dev@lynxeye.de> MIME-Version: 1.0 Cc: Tom Warren Subject: [U-Boot] =?utf-8?q?=5BPATCH_2/2=5D_tegra=3A_usb=3A_fix_wrong_erro?= =?utf-8?q?r_check?= X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de loop_count runs down from 10000, so the correct condition to error out is ==0. Signed-off-by: Lucas Stach Acked-by: Stephen Warren CC: Stephen Warren CC: Tom Warren Tested-by: Stephen 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;