aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorfrançois romieu <romieu@fr.zoreil.com>2009-06-17 07:43:11 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-17 21:46:46 -0400
commitc2f3f3a2fe4e35db352cfe1176e384e36bfd91b1 (patch)
tree28abad21db7632288692371f62d8c47108bfeeaa /drivers/net
parentfb1001f3de1a8576b25d929502f1fe7865ff32dc (diff)
sis190: use an adequate phy list entry as a fallback
When sis190 driver is trying to get default phy, if it doesn't find home or lan phy, it falls back to the first phy in the phy list but list_entry() points to a bogus entry. list_first_entry() should be used instead. Signed-off-by: Arnaud Patard <apatard@mandriva.com> Acked-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/sis190.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index e2247669a495..1f040e8a000b 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -1281,7 +1281,7 @@ static u16 sis190_default_phy(struct net_device *dev)
1281 else if (phy_lan) 1281 else if (phy_lan)
1282 phy_default = phy_lan; 1282 phy_default = phy_lan;
1283 else 1283 else
1284 phy_default = list_entry(&tp->first_phy, 1284 phy_default = list_first_entry(&tp->first_phy,
1285 struct sis190_phy, list); 1285 struct sis190_phy, list);
1286 } 1286 }
1287 1287