[PATCH v1 1/2] Revert "usb: typec: ucsi: displayport: Fix OOB altmode array index"

From: Jameson Thies

Date: Thu Sep 10 2026 - 19:37:44 EST


This reverts commit 04cec690b1fd9d1c4c314b91a10d8c68a3acfe18.

Signed-off-by: Jameson Thies <jthies@xxxxxxxxxx>
---
drivers/usb/typec/ucsi/displayport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/typec/ucsi/displayport.c b/drivers/usb/typec/ucsi/displayport.c
index 8d2032d0762c..7067f2561b84 100644
--- a/drivers/usb/typec/ucsi/displayport.c
+++ b/drivers/usb/typec/ucsi/displayport.c
@@ -74,7 +74,7 @@ static int ucsi_displayport_enter(struct typec_altmode *alt, u32 *vdo)
cur = 0xff;
}

- if (cur < UCSI_MAX_ALTMODES) {
+ if (cur != 0xff) {
ret = dp->con->port_altmode[cur] == alt ? 0 : -EBUSY;
goto err_unlock;
}
--
2.55.0.1007.g17ff1f9808-goog