summaryrefslogtreecommitdiff
path: root/driver/retimer/bb_retimer.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/retimer/bb_retimer.c')
-rw-r--r--driver/retimer/bb_retimer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/retimer/bb_retimer.c b/driver/retimer/bb_retimer.c
index a8e93949c1..cbaf58cb61 100644
--- a/driver/retimer/bb_retimer.c
+++ b/driver/retimer/bb_retimer.c
@@ -527,7 +527,7 @@ static int console_command_bb_retimer(int argc, char **argv)
/* Get port number */
port = strtoi(argv[1], &e, 0);
- if (*e || port < 0 || port > board_get_usb_pd_port_count())
+ if (*e || !board_is_usb_pd_port_present(port))
return EC_ERROR_PARAM1;
mux = &usb_muxes[port];