summaryrefslogtreecommitdiff
path: root/lib/test_fprobe.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/test_fprobe.c')
-rw-r--r--lib/test_fprobe.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/test_fprobe.c b/lib/test_fprobe.c
index e0381b3ec410..1fb56cf5e5ce 100644
--- a/lib/test_fprobe.c
+++ b/lib/test_fprobe.c
@@ -144,10 +144,7 @@ static unsigned long get_ftrace_location(void *func)
static int fprobe_test_init(struct kunit *test)
{
- do {
- rand1 = get_random_u32();
- } while (rand1 <= div_factor);
-
+ rand1 = get_random_u32_above(div_factor);
target = fprobe_selftest_target;
target2 = fprobe_selftest_target2;
target_ip = get_ftrace_location(target);