提交 a79741fd 编写于 作者: C Colin Ian King 提交者: Felipe Balbi

usb: gadget: dummy: fix infinite loop because of missing loop decrement

The while loop never terminates because the loop counter i is never
decremented. Fix this by decrementing i.

Detected by CoverityScan, CID#751073 ("Infinite Loop")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 c0542900
......@@ -2776,7 +2776,7 @@ static int __init init(void)
if (retval < 0) {
i--;
while (i >= 0)
platform_device_del(the_udc_pdev[i]);
platform_device_del(the_udc_pdev[i--]);
goto err_add_udc;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册