提交 f857fff6 编写于 作者: L Lucas Stach 提交者: Albert ARIBAUD (U-Boot)

tegra: usb: fix wrong error check

loop_count runs down from 10000, so the correct condition to error out
is ==0.
Signed-off-by: NLucas Stach <dev@lynxeye.de>
Acked-by: NStephen Warren <swarren@wwwdotorg.org>
CC: Stephen Warren <swarren@wwwdotorg.org>
CC: Tom Warren <twarren.nvidia@gmail.com>
Tested-by: NStephen Warren <swarren@wwwdotorg.org>
Signed-off-by: NTom Warren <twarren@nvidia.com>
上级 f97daaa2
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册