lib: Fix atomic64_inc_not_zero test
[firefly-linux-kernel-4.4.55.git] / lib / atomic64_test.c
index ee8e6de8b41319e128afecc63de9b18bb93e0279..f7bb706c9c3afa98fd079fa626ada08db2b31cd9 100644 (file)
@@ -130,16 +130,16 @@ static __init int test_atomic64(void)
 #endif
 
        INIT(onestwos);
-       BUG_ON(atomic64_inc_not_zero(&v));
+       BUG_ON(!atomic64_inc_not_zero(&v));
        r += one;
        BUG_ON(v.counter != r);
 
        INIT(0);
-       BUG_ON(!atomic64_inc_not_zero(&v));
+       BUG_ON(atomic64_inc_not_zero(&v));
        BUG_ON(v.counter != r);
 
        INIT(-one);
-       BUG_ON(atomic64_inc_not_zero(&v));
+       BUG_ON(!atomic64_inc_not_zero(&v));
        r += one;
        BUG_ON(v.counter != r);