Skip to content

Commit 08a7227

Browse files
xiaoguangwuwenlingz
authored andcommitted
DM USB: xHCI: fix bug in port unassigning function
The function for port unassigning: pci_xhci_clr_native_port_assigned should reset the 'info' member to all zero when it is called. Tracked-On: #1434 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 d700840 commit 08a7227

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

devicemodel/hw/pci/xhci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ pci_xhci_clr_native_port_assigned(struct pci_xhci_vdev *xdev,
588588
if (i >= 0) {
589589
xdev->native_ports[i].state = VPORT_FREE;
590590
xdev->native_ports[i].vport = 0;
591+
memset(&xdev->native_ports[i].info, 0, sizeof(*info));
591592
}
592593
}
593594

0 commit comments

Comments
 (0)