diff --git a/hw/usb/core.c b/hw/usb/core.c index bfb7ae67bb..8fbd9c7d57 100644 --- a/hw/usb/core.c +++ b/hw/usb/core.c @@ -717,9 +717,7 @@ struct USBEndpoint *usb_ep_get(USBDevice *dev, int pid, int ep) { struct USBEndpoint *eps; - if (dev == NULL) { - return NULL; - } + assert(dev != NULL); if (ep == 0) { return &dev->ep_ctl; }