No caller of usb_ep_get() calls it with a NULL device (previous commits
have addressed the few remaining cases which didn't explicitly check).
Replace check for 'dev == NULL' with an assert instead.
Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
---
hw/usb/core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/usb/core.c b/hw/usb/core.c
index bfb7ae67bbf0..8fbd9c7d573b 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;
}
--
1.8.3.1