Message ID | 20090617214311.GB27064@electric-eye.fr.zoreil.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Francois Romieu <romieu@fr.zoreil.com> Date: Wed, 17 Jun 2009 23:43:11 +0200 > 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> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index e224766..1f040e8 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c @@ -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); }
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> --- drivers/net/sis190.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)