DM9000B: Fix reg_save after spin_lock in dm9000_timeout
Henry Nestler [Sun, 20 Feb 2011 11:44:58 +0000 (11:44 +0000)]
The spin_lock should hold before reading register.

Signed-off-by: David S. Miller <davem@davemloft.net>

drivers/net/dm9000.c

index 2d4c4fc..2bbd496 100644 (file)
@@ -852,8 +852,8 @@ static void dm9000_timeout(struct net_device *dev)
        unsigned long flags;
 
        /* Save previous register address */
-       reg_save = readb(db->io_addr);
        spin_lock_irqsave(&db->lock, flags);
+       reg_save = readb(db->io_addr);
 
        netif_stop_queue(dev);
        dm9000_reset(db);