浏览代码

net/designware: Phy address fix

The code assumes the phy address to be > 0, which is not true, the phy address
can be in the range 0-31.

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Vipin KUMAR 13 年之前
父节点
当前提交
024333c96f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/designware.c

+ 1 - 1
drivers/net/designware.c

@@ -384,7 +384,7 @@ static int configure_phy(struct eth_device *dev)
 
 #if defined(CONFIG_DW_SEARCH_PHY)
 	phy_addr = find_phy(dev);
-	if (phy_addr > 0)
+	if (phy_addr >= 0)
 		priv->address = phy_addr;
 	else
 		return -1;