usb: remove unnecessary NULL device check from usb_ep_get()

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>
Message-id: 1549460216-25808-10-git-send-email-liam.merwick@oracle.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Liam Merwick 2019-02-06 13:36:56 +00:00 committed by Gerd Hoffmann
parent 4fc12aa1fc
commit 7011baece2

View File

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