mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
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 <[email protected]> Message-id: [email protected] Signed-off-by: Gerd Hoffmann <[email protected]>
This commit is contained in:
1 parent
4fc12aa1fc
commit
7011baece2
1 file changed
+1
-3
+1
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user