From: Paul Mundt Date: Mon, 8 Dec 2008 08:01:40 +0000 (+0900) Subject: sh: Fix an off-by-1 check in __mutex_fastpath_unlock(). X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=06be3724548a443a99d703ff79f43d6f1e2975f0;p=linux-beck.git sh: Fix an off-by-1 check in __mutex_fastpath_unlock(). Signed-off-by: Paul Mundt --- diff --git a/arch/sh/include/asm/mutex-llsc.h b/arch/sh/include/asm/mutex-llsc.h index a91990c6e8e5..ee839ee58ac8 100644 --- a/arch/sh/include/asm/mutex-llsc.h +++ b/arch/sh/include/asm/mutex-llsc.h @@ -73,7 +73,7 @@ __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *)) : "t"); __res |= !__ex_flag; - if (unlikely(__res != 0)) + if (unlikely(__res <= 0)) fail_fn(count); }