summaryrefslogtreecommitdiff
path: root/bitops.h
diff options
context:
space:
mode:
Diffstat (limited to 'bitops.h')
-rw-r--r--bitops.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitops.h b/bitops.h
index ae7bcb1b1c..e2b9df3155 100644
--- a/bitops.h
+++ b/bitops.h
@@ -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;