pinctrl: fix loop in k210_pinconf_get_drive()

The loop exited too early so the k210_pinconf_drive_strength[0] array
element was never used.

Fixes: d4c34d09ab03 ("pinctrl: Add RISC-V Canaan Kendryte K210 FPIOA driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20220209180804.GA18385@kili
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Dan Carpenter and committed by
Linus Walleij
ba2ab859 dfd42fac

+1 -1
+1 -1
drivers/pinctrl/pinctrl-k210.c
··· 482 { 483 int i; 484 485 - for (i = K210_PC_DRIVE_MAX; i; i--) { 486 if (k210_pinconf_drive_strength[i] <= max_strength_ua) 487 return i; 488 }
··· 482 { 483 int i; 484 485 + for (i = K210_PC_DRIVE_MAX; i >= 0; i--) { 486 if (k210_pinconf_drive_strength[i] <= max_strength_ua) 487 return i; 488 }