Skip to content
Snippets Groups Projects
Commit 7011baec authored by Liam Merwick's avatar Liam Merwick Committed by Gerd Hoffmann
Browse files

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: default avatarLiam Merwick <liam.merwick@oracle.com>
Message-id: 1549460216-25808-10-git-send-email-liam.merwick@oracle.com
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 4fc12aa1
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment