mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02: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
|
|
@ -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…
Reference in New Issue
Block a user