diff --git a/drivers/pinctrl/pinctrl-k210.c b/drivers/pinctrl/pinctrl-k210.c index 63084ae8375..f809149102f 100644 --- a/drivers/pinctrl/pinctrl-k210.c +++ b/drivers/pinctrl/pinctrl-k210.c @@ -511,7 +511,7 @@ static int k210_pc_get_drive(unsigned max_strength_ua) { int i; - for (i = K210_PC_DRIVE_MAX; i; i--) + for (i = K210_PC_DRIVE_MAX; i >= 0; i--) if (k210_pc_drive_strength[i] < max_strength_ua) return i;