diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-10-17 18:54:27 +0400 |
---|---|---|
committer | Jesper Nilsson <jesper@jni.nu> | 2012-12-20 15:51:19 +0400 |
commit | 00addd1a2de8d83dc3a5d6bb926911268ec716c9 (patch) | |
tree | 9a3cd51906455f0dc446c1690ca66a8e6e9c0cc4 /arch/cris | |
parent | e61ac0b05c53f5b56f3ea623c215437c09d8265b (diff) | |
download | linux-00addd1a2de8d83dc3a5d6bb926911268ec716c9.tar.xz |
CRIS: locking: fix the return value of arch_read_trylock()
arch_write_trylock() should return 'ret' instead of always
return 1.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Diffstat (limited to 'arch/cris')
-rw-r--r-- | arch/cris/include/arch-v32/arch/spinlock.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/cris/include/arch-v32/arch/spinlock.h b/arch/cris/include/arch-v32/arch/spinlock.h index f171a6600fbc..f13275522f4d 100644 --- a/arch/cris/include/arch-v32/arch/spinlock.h +++ b/arch/cris/include/arch-v32/arch/spinlock.h @@ -118,7 +118,7 @@ static inline int arch_write_trylock(arch_rwlock_t *rw) ret = 1; } arch_spin_unlock(&rw->slock); - return 1; + return ret; } #define _raw_read_lock_flags(lock, flags) _raw_read_lock(lock) |