Skip to content

Commit 00addd1

Browse files
Wei YongjunJesper Nilsson
authored andcommitted
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>
1 parent e61ac0b commit 00addd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/cris/include/arch-v32/arch/spinlock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static inline int arch_write_trylock(arch_rwlock_t *rw)
118118
ret = 1;
119119
}
120120
arch_spin_unlock(&rw->slock);
121-
return 1;
121+
return ret;
122122
}
123123

124124
#define _raw_read_lock_flags(lock, flags) _raw_read_lock(lock)

0 commit comments

Comments
 (0)