diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dynamic_debug.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 5a7bacc2e901..4be55d8d76b8 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c | |||
@@ -871,23 +871,28 @@ static int __init dynamic_debug_init(void) | |||
871 | int ret = 0; | 871 | int ret = 0; |
872 | int n = 0; | 872 | int n = 0; |
873 | 873 | ||
874 | if (__start___verbose != __stop___verbose) { | 874 | if (__start___verbose == __stop___verbose) { |
875 | iter = __start___verbose; | 875 | pr_warn("_ddebug table is empty in a " |
876 | modname = iter->modname; | 876 | "CONFIG_DYNAMIC_DEBUG build"); |
877 | iter_start = iter; | 877 | return 1; |
878 | for (; iter < __stop___verbose; iter++) { | 878 | } |
879 | if (strcmp(modname, iter->modname)) { | 879 | iter = __start___verbose; |
880 | ret = ddebug_add_module(iter_start, n, modname); | 880 | modname = iter->modname; |
881 | if (ret) | 881 | iter_start = iter; |
882 | goto out_free; | 882 | for (; iter < __stop___verbose; iter++) { |
883 | n = 0; | 883 | if (strcmp(modname, iter->modname)) { |
884 | modname = iter->modname; | 884 | ret = ddebug_add_module(iter_start, n, modname); |
885 | iter_start = iter; | 885 | if (ret) |
886 | } | 886 | goto out_free; |
887 | n++; | 887 | n = 0; |
888 | modname = iter->modname; | ||
889 | iter_start = iter; | ||
888 | } | 890 | } |
889 | ret = ddebug_add_module(iter_start, n, modname); | 891 | n++; |
890 | } | 892 | } |
893 | ret = ddebug_add_module(iter_start, n, modname); | ||
894 | if (ret) | ||
895 | goto out_free; | ||
891 | 896 | ||
892 | /* ddebug_query boot param got passed -> set it up */ | 897 | /* ddebug_query boot param got passed -> set it up */ |
893 | if (ddebug_setup_string[0] != '\0') { | 898 | if (ddebug_setup_string[0] != '\0') { |