diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 0298eb8eaa4e..0a3af2965ba0 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1994,6 +1994,7 @@ config TEST_MEMCAT_P
 config TEST_LIVEPATCH
 	tristate "Test livepatching"
 	default n
+	depends on DYNAMIC_DEBUG
 	depends on LIVEPATCH
 	depends on m
 	help