mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-26 12:27:12 +00:00
pinctrl: k210: Fix loop in k210_pc_get_drive()
The loop exited too early so the k210_pc_drive_strength[0] array element
was never used.
Original Linux patch by Dan Carpenter:
https://lore.kernel.org/linux-gpio/20220209180804.GA18385@kili/
Fixes: 7224d5ccf8
("pinctrl: Add support for Kendryte K210 FPIOA")
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
parent
bae4d9fbd9
commit
daaf18267f
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue