提交 5e50adf6 编写于 作者: M Marek Vasut 提交者: Marek Vasut

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: NMarek Vasut <marek.vasut+renesas@gmail.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
上级 a032e0a6
......@@ -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++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册