mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
phy: Fix off-by-one error when parsing DT PHY bindings
The code fails to copy the last PHY phandle argument, so it is missing from the adjusted phandle args and the consumer cannot use it to determine what the PHY should do. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Patrice Chotard <patrice.chotard@st.com>
This commit is contained in:
parent
a032e0a6ae
commit
5e50adf667
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ int generic_phy_get_by_index(struct udevice *dev, int index,
|
|||
return ret;
|
||||
|
||||
/* insert phy idx at first position into args array */
|
||||
for (i = args.args_count; i > 1 ; i--)
|
||||
for (i = args.args_count; i >= 1 ; i--)
|
||||
args.args[i] = args.args[i - 1];
|
||||
|
||||
args.args_count++;
|
||||
|
|
Loading…
Reference in a new issue