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: Tomasz Moń <tomasz.mon@nordicsemi.no>
This commit is contained in:
Tomasz Moń 2022-11-21 08:30:52 +01:00 committed by Carles Cufí
commit 460ca86527

View file

@ -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;