mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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:
parent
c05429005b
commit
a79741fdb0
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue