提交 7011baec 编写于 作者: L Liam Merwick 提交者: Gerd Hoffmann

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: NLiam Merwick <liam.merwick@oracle.com>
Message-id: 1549460216-25808-10-git-send-email-liam.merwick@oracle.com
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 4fc12aa1
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册