Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a79741fd authored by Colin Ian King's avatar Colin Ian King Committed by Felipe Balbi
Browse files

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent c0542900
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
		}
	}