]> git.sur5r.net Git - u-boot/commitdiff
tegra: usb: fix wrong error check
authorLucas Stach <dev@lynxeye.de>
Thu, 31 May 2012 01:51:02 +0000 (01:51 +0000)
committerAlbert ARIBAUD (U-Boot) <uboot@lilith.(none)>
Mon, 9 Jul 2012 20:44:33 +0000 (22:44 +0200)
loop_count runs down from 10000, so the correct condition to error out
is ==0.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
CC: Stephen Warren <swarren@wwwdotorg.org>
CC: Tom Warren <twarren.nvidia@gmail.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/cpu/armv7/tegra2/usb.c

index c80de7f6a37d023e5ad3b2fb2e3476f6b565c2b8..5f2b2437502555bbf613138a8747dc37858f53cf 100644 (file)
@@ -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;