From 024333c96fecb698efe703e01f2326c1256114a4 Mon Sep 17 00:00:00 2001 From: Vipin KUMAR Date: Mon, 26 Mar 2012 00:09:54 +0000 Subject: [PATCH] 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 Signed-off-by: Amit Virdi --- drivers/net/designware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/designware.c b/drivers/net/designware.c index ea8a40612e..fc14b70420 100644 --- a/drivers/net/designware.c +++ b/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; -- 2.25.1