Skip to content

Commit

Permalink
sh: Fix an off-by-1 check in __mutex_fastpath_unlock().
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Dec 22, 2008
1 parent a47925f commit 06be372
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/include/asm/mutex-llsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 06be372

Please sign in to comment.