devicemodel: hw: pci: xhci: Remove unnecessary condition

Because of the iteration of i as is, the condition i <= XHCI_MAX_DEVS
always results as true and thus is unnecessary.

When compiling with cflag -Werror this condition will result in a
compilation failure.

Tracked-On: #8114

Signed-off-by: Marius Rodi <marius.rodi@linutronix.de>
This commit is contained in:
Marius Rodi 2022-09-06 09:35:44 +02:00 committed by acrnsi-robot
parent 3eea8d6da8
commit 8fe8b15a02

View File

@ -1942,7 +1942,7 @@ pci_xhci_cmd_disable_slot(struct pci_xhci_vdev *xdev, uint32_t slot)
if (dev == xdev->devices[i])
break;
if (i <= XHCI_MAX_DEVS && XHCI_PORTREG_PTR(xdev, i)) {
if (XHCI_PORTREG_PTR(xdev, i)) {
XHCI_PORTREG_PTR(xdev, i)->portsc &= ~(XHCI_PS_CSC |
XHCI_PS_CCS | XHCI_PS_PED);