Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=633edf5a4fff0675851e377cc5f0c9072683a5f4
Commit:     633edf5a4fff0675851e377cc5f0c9072683a5f4
Parent:     bafef0ae9d3651540c442aebf242f7b68e183bff
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 14 17:00:58 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Nov 14 18:45:45 2007 -0800

    cris-build-fixes-update-eth_v10c-ethernet-driver-fix
    
    Fix locking bug noted by  Roel Kluin <[EMAIL PROTECTED]>.
    
    Cc: Jeff Garzik <[EMAIL PROTECTED]>
    Cc: Jesper Nilsson <[EMAIL PROTECTED]>
    Cc: Mikael Starvik <[EMAIL PROTECTED]>
    Cc: Roel Kluin <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/net/cris/eth_v10.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c
index 26ffa81..5dc984a 100644
--- a/drivers/net/cris/eth_v10.c
+++ b/drivers/net/cris/eth_v10.c
@@ -1088,6 +1088,8 @@ e100_set_duplex(struct net_device* dev, enum duplex 
new_duplex)
 static int
 e100_probe_transceiver(struct net_device* dev)
 {
+       int ret = 0;
+
 #if !defined(CONFIG_ETRAX_NO_PHY)
        unsigned int phyid_high;
        unsigned int phyid_low;
@@ -1104,8 +1106,10 @@ e100_probe_transceiver(struct net_device* dev)
                                      np->mii_if.phy_id, MII_BMSR) != 0xffff)
                        break;
        }
-       if (np->mii_if.phy_id == 32)
-                return -ENODEV;
+       if (np->mii_if.phy_id == 32) {
+               ret = -ENODEV;
+               goto out;
+       }
 
        /* Get manufacturer */
        phyid_high = e100_get_mdio_reg(dev, np->mii_if.phy_id, MII_PHYSID1);
@@ -1117,10 +1121,10 @@ e100_probe_transceiver(struct net_device* dev)
                        break;
        }
        transceiver = ops;
-
+out:
        spin_unlock(&np->transceiver_lock);
 #endif
-       return 0;
+       return ret;
 }
 
 static int
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to