[U-Boot] [PATCH] removed '!' in for loop stop condition

Niv Shetrit niv.shetrit at altair-semi.com
Tue Aug 27 13:02:17 UTC 2019


Signed-off-by: Niv Shetrit <niv.shetrit at altair-semi.com>
---
 drivers/usb/gadget/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/core.c b/drivers/usb/gadget/core.c
index ffaf161fb7..ae7387ee0a 100644
--- a/drivers/usb/gadget/core.c
+++ b/drivers/usb/gadget/core.c
@@ -307,7 +307,7 @@ struct usb_endpoint_descriptor *usbd_device_endpoint_descriptor (struct usb_devi
 	struct usb_endpoint_descriptor *endpoint_descriptor;
 	int i;
 
-	for (i = 0; !(endpoint_descriptor = usbd_device_endpoint_descriptor_index (device, port, configuration, interface, alternate, i)); i++) {
+	for (i = 0; endpoint_descriptor = usbd_device_endpoint_descriptor_index (device, port, configuration, interface, alternate, i); i++) {
 		if (endpoint_descriptor->bEndpointAddress == endpoint) {
 			return endpoint_descriptor;
 		}
-- 
2.17.1



More information about the U-Boot mailing list