Skip to content

Commit 772e50a

Browse files
Tzung-Bi Shihshuahkh
authored andcommitted
kunit: Fix wrong parameter to kunit_deactivate_static_stub()
kunit_deactivate_static_stub() accepts real_fn_addr instead of replacement_addr. In the case, it always passes NULL to kunit_deactivate_static_stub(). Fix it. Link: https://lore.kernel.org/r/[email protected] Fixes: e047c5e ("kunit: Expose 'static stub' API to redirect functions") Signed-off-by: Tzung-Bi Shih <[email protected]> Reviewed-by: David Gow <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent ce7ff26 commit 772e50a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/kunit/static_stub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void __kunit_activate_static_stub(struct kunit *test,
9696

9797
/* If the replacement address is NULL, deactivate the stub. */
9898
if (!replacement_addr) {
99-
kunit_deactivate_static_stub(test, replacement_addr);
99+
kunit_deactivate_static_stub(test, real_fn_addr);
100100
return;
101101
}
102102

0 commit comments

Comments
 (0)