Commit 9bef7d07 authored by Mahesh Mahadevan's avatar Mahesh Mahadevan Committed by Fabio Baltieri
Browse files

drivers: usb: mcux: Remove unnecessary while loop



The while loop is changed to an if check.

Signed-off-by: default avatarMahesh Mahadevan <mahesh.mahadevan@nxp.com>
parent 17da2015
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -560,7 +560,7 @@ int usb_dc_ep_read_wait(uint8_t ep, uint8_t *data, uint32_t max_data_len,
	uint32_t data_len;
	uint8_t *bufp = NULL;

	while (dev_state.eps[ep_abs_idx].ep_occupied) {
	if (dev_state.eps[ep_abs_idx].ep_occupied) {
		LOG_ERR("Endpoint is occupied by the controller");
		return -EBUSY;
	}