Skip to content

Commit c5dcb34

Browse files
xiaoguangwulijinxia
authored andcommitted
DM USB: xHCI: fix a potential issue of crash
This patch is used to fix a potential issue resulted from typo. Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com> Reviewed-by: Liang Yang <liang3.yang@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
1 parent 7bc1a3f commit c5dcb34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

devicemodel/hw/pci/xhci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ pci_xhci_native_usb_dev_disconn_cb(void *hci_data, void *dev_data)
593593
if (xdev->slots[slot] == edev)
594594
break;
595595

596-
assert(slot < USB_NATIVE_NUM_BUS);
596+
assert(slot < XHCI_MAX_SLOTS);
597597

598598
status = VPORT_STATE(xdev->port_map_tbl[di.bus][di.port]);
599599
assert(status == VPORT_EMULATED || status == VPORT_CONNECTED);

0 commit comments

Comments
 (0)