bitops: fix test_and_change_bit()

./bitops.h:192: warning: ‘old’ is used uninitialized in this function

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Corentin Chary 2011-02-24 23:47:08 +01:00 committed by Blue Swirl
parent 89d2d3af51
commit 04483e150d
1 changed files with 1 additions and 1 deletions

View File

@ -187,7 +187,7 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
{
unsigned long mask = BIT_MASK(nr);
unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr);
unsigned long old;
unsigned long old = *p;
*p = old ^ mask;
return (old & mask) != 0;