diff --git a/devicemodel/hw/pci/xhci.c b/devicemodel/hw/pci/xhci.c index d82d52ac7..47e72bcf2 100644 --- a/devicemodel/hw/pci/xhci.c +++ b/devicemodel/hw/pci/xhci.c @@ -2937,6 +2937,9 @@ pci_xhci_device_doorbell(struct pci_xhci_vdev *xdev, } dev = XHCI_SLOTDEV_PTR(xdev, slot); + if (!dev) + return; + devep = &dev->eps[epid]; dev_ctx = pci_xhci_get_dev_ctx(xdev, slot); if (!dev_ctx)