]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
DM9000B: Fix reg_save after spin_lock in dm9000_timeout
authorHenry Nestler <henry.nestler@gmail.com>
Sun, 20 Feb 2011 11:44:58 +0000 (11:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Feb 2011 22:29:49 +0000 (14:29 -0800)
The spin_lock should hold before reading register.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dm9000.c

index 2d4c4fc1d90053fa6c04785eac027ef0a59d424c..2bbd49653aa2cf6fbc71664786e42027ff6690d0 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);