Skip to contentSkip to conversation

tulip: add return to ULI526X clause in tulip_mdio_write

PATCH Applied John W. Linville 2 participants 2 messages May 18, 2005 – May 24, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tulip: add return to ULI526X clause in tulip_mdio_write

The 'if' clause for ULI526X in tulip_mdio_write allows for spin_unlock_irqrestore to be called twice for tp->mii_lock. I believe this is caused by the unintentional omission of a return at the end of that clause. This patch adds that return.

---
I'm copying Clear Zhang on this. As the author of the patch that added this code, he should know whether or not my intuitive fix is actually correct... :-)

 drivers/net/tulip/media.c |    1 +
 1 files changed, 1 insertion(+)
drivers/net/tulip/media.c renamed from drivers/net/tulip/media.c.orig +1 -0
@@ -174,6 +174,7 @@ void tulip_mdio_write(struct net_device 
 				break;
 		}
 		spin_unlock_irqrestore(&tp->mii_lock, flags);
+		return;
 	}
 		
 	/* Establish sync by sending 32 logic ones. */
Signature · 2 lines
John W. Linville
[email protected]