mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-22 04:15:02 +00:00
[NET]: Fix reversed error test in netif_tx_trylock
A non-zero return value indicates success from spin_trylock, not error. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
bf9915cc55
commit
53c4b2cc7a
1 changed files with 3 additions and 3 deletions
|
@ -924,10 +924,10 @@ static inline void netif_tx_lock_bh(struct net_device *dev)
|
||||||
|
|
||||||
static inline int netif_tx_trylock(struct net_device *dev)
|
static inline int netif_tx_trylock(struct net_device *dev)
|
||||||
{
|
{
|
||||||
int err = spin_trylock(&dev->_xmit_lock);
|
int ok = spin_trylock(&dev->_xmit_lock);
|
||||||
if (!err)
|
if (likely(ok))
|
||||||
dev->xmit_lock_owner = smp_processor_id();
|
dev->xmit_lock_owner = smp_processor_id();
|
||||||
return err;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void netif_tx_unlock(struct net_device *dev)
|
static inline void netif_tx_unlock(struct net_device *dev)
|
||||||
|
|
Loading…
Reference in a new issue