aboutsummaryrefslogtreecommitdiffstats
path: root/patches/linux-2.6.16.32/net-gso-3-fix-errorcheck.patch
blob: 0c373223d88d5ea2f4ced26981bc2eba4787f196 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff -pruN ../orig-linux-2.6.16.29/include/linux/netdevice.h ./include/linux/netdevice.h
--- ../orig-linux-2.6.16.29/include/linux/netdevice.h	2006-09-19 13:59:46.000000000 +0100
+++ ./include/linux/netdevice.h	2006-09-19 14:05:28.000000000 +0100
@@ -930,10 +930,10 @@ static inline void netif_tx_lock_bh(stru
 
 static inline int netif_tx_trylock(struct net_device *dev)
 {
-	int err = spin_trylock(&dev->_xmit_lock);
-	if (!err)
+	int ok = spin_trylock(&dev->_xmit_lock);
+	if (likely(ok))
 		dev->xmit_lock_owner = smp_processor_id();
-	return err;
+	return ok;
 }
 
 static inline void netif_tx_unlock(struct net_device *dev)