diff options
Diffstat (limited to 'arch/tile/include/asm/spinlock_32.h')
-rw-r--r-- | arch/tile/include/asm/spinlock_32.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/tile/include/asm/spinlock_32.h b/arch/tile/include/asm/spinlock_32.h index f3a8473c68da..88efdde8dd2b 100644 --- a/arch/tile/include/asm/spinlock_32.h +++ b/arch/tile/include/asm/spinlock_32.h @@ -134,9 +134,8 @@ static inline int arch_read_trylock(arch_rwlock_t *rwlock) { int locked; u32 val = __insn_tns((int *)&rwlock->lock); - if (unlikely(val & 1)) { + if (unlikely(val & 1)) return arch_read_trylock_slow(rwlock); - } locked = (val << _RD_COUNT_WIDTH) == 0; rwlock->lock = val + (locked << _RD_COUNT_SHIFT); return locked; |