summaryrefslogtreecommitdiffstats
path: root/lib/test_kasan.c
diff options
context:
space:
mode:
authorRicardo Ribalda <ribalda@chromium.org>2022-02-11 17:42:44 +0100
committerShuah Khan <skhan@linuxfoundation.org>2022-04-04 14:29:20 -0600
commitccad78f17f9f2a9acc811f8762aa428644205c9b (patch)
treeddb7bd839b791ada75f3da062b2c3dcdee555a4f /lib/test_kasan.c
parent7aadf84333572fa011ada2dbf469295b84587739 (diff)
downloadlinux-ccad78f17f9f2a9acc811f8762aa428644205c9b.tar.bz2
kasan: test: Use NULL macros
Replace PTR_EQ checks with the more idiomatic and specific NULL macros. Acked-by: Daniel Latypov <dlatypov@google.com> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Acked-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'lib/test_kasan.c')
-rw-r--r--lib/test_kasan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/test_kasan.c b/lib/test_kasan.c
index ad880231dfa8..c233b1a4e984 100644
--- a/lib/test_kasan.c
+++ b/lib/test_kasan.c
@@ -391,7 +391,7 @@ static void krealloc_uaf(struct kunit *test)
kfree(ptr1);
KUNIT_EXPECT_KASAN_FAIL(test, ptr2 = krealloc(ptr1, size2, GFP_KERNEL));
- KUNIT_ASSERT_PTR_EQ(test, (void *)ptr2, NULL);
+ KUNIT_ASSERT_NULL(test, ptr2);
KUNIT_EXPECT_KASAN_FAIL(test, *(volatile char *)ptr1);
}