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: Colin Ian King <colin.king@canonical.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:

committad av
Felipe Balbi

förälder
c05429005b
incheckning
a79741fdb0
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Referens i nytt ärende
Block a user