From: Wei Yongjun Date: Wed, 17 Oct 2012 14:54:27 +0000 (+0200) Subject: CRIS: locking: fix the return value of arch_read_trylock() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=00addd1a2de8d83dc3a5d6bb926911268ec716c9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Jesper Nilsson --- 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)