Skip to content

Commit

Permalink
sis190: use an adequate phy list entry as a fallback
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
françois romieu authored and David S. Miller committed Jun 18, 2009
1 parent fb1001f commit c2f3f3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/sis190.c
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ static u16 sis190_default_phy(struct net_device *dev)
else if (phy_lan)
phy_default = phy_lan;
else
phy_default = list_entry(&tp->first_phy,
phy_default = list_first_entry(&tp->first_phy,
struct sis190_phy, list);
}

Expand Down

0 comments on commit c2f3f3a

Please sign in to comment.