sh: Fix an off-by-1 check in __mutex_fastpath_unlock().
authorPaul Mundt <lethal@linux-sh.org>
Mon, 8 Dec 2008 08:01:40 +0000 (17:01 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 22 Dec 2008 09:44:02 +0000 (18:44 +0900)
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/include/asm/mutex-llsc.h

index a91990c6e8e595bb2d5eaad39ad7f891249268b3..ee839ee58ac84894515d328b78f1bb73dc43119f 100644 (file)
@@ -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);
 }