Commit 460ca865 authored by Tomasz Moń's avatar Tomasz Moń Committed by Carles Cufi
Browse files

drivers: usb_dc_nrfx: Always allow endpoint disable

There is no point in allowing endpoint disable only when device is
attached and ready. Remove the pointless check as it is actually harmful
and prevents endpoints disable on USB stack disable.

Signed-off-by: default avatarTomasz Moń <tomasz.mon@nordicsemi.no>
parent e458f5aa
Loading
Loading
Loading
Loading
+0 −4
Changes for drivers/usb/device/usb_dc_nrfx.c: 0 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -1578,10 +1578,6 @@ int usb_dc_ep_disable(const uint8_t ep)
{
	struct nrf_usbd_ep_ctx *ep_ctx;

	if (!dev_attached() || !dev_ready()) {
		return -ENODEV;
	}

	ep_ctx = endpoint_ctx(ep);
	if (!ep_ctx) {
		return -EINVAL;