From: Lucas Stach Date: Thu, 31 May 2012 01:51:02 +0000 (+0000) Subject: tegra: usb: fix wrong error check X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=f857fff6068fe36a327a0ff6d837412caaf2e07d;p=u-boot.git tegra: usb: fix wrong error check 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 Signed-off-by: Tom Warren --- diff --git a/arch/arm/cpu/armv7/tegra2/usb.c b/arch/arm/cpu/armv7/tegra2/usb.c index c80de7f6a3..5f2b243750 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;