[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090617214311.GB27064@electric-eye.fr.zoreil.com>
Date: Wed, 17 Jun 2009 23:43:11 +0200
From: Francois Romieu <romieu@...zoreil.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: Arnaud Patard <apatard@...driva.com>, netdev@...r.kernel.org
Subject: [PATCH] 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@...driva.com>
Acked-off-by: Francois Romieu <romieu@...zoreil.com>
---
drivers/net/sis190.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
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);
}
--
1.6.2.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists