netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sis190: use an adequate phy list entry as a fallback
@ 2009-06-17 21:43 Francois Romieu
  2009-06-18  1:54 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Francois Romieu @ 2009-06-17 21:43 UTC (permalink / raw)
  To: David S. Miller; +Cc: Arnaud Patard, netdev

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(-)

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sis190: use an adequate phy list entry as a fallback
  2009-06-17 21:43 [PATCH] sis190: use an adequate phy list entry as a fallback Francois Romieu
@ 2009-06-18  1:54 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-06-18  1:54 UTC (permalink / raw)
  To: romieu; +Cc: apatard, netdev

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-18  1:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-17 21:43 [PATCH] sis190: use an adequate phy list entry as a fallback Francois Romieu
2009-06-18  1:54 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).