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>
diff --git a/bitops.h b/bitops.h
index ae7bcb1..e2b9df3 100644
--- a/bitops.h
+++ b/bitops.h
@@ -187,7 +187,7 @@
{
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;