dyndbg: vpr-info on remove-module complete, not starting
[sfrench/cifs-2.6.git] / lib / dynamic_debug.c
index a44ae0b4b022aeb45e787cddd77581a46b0fe7cb..d706abba8dada26febe58469f734eb0307afb95a 100644 (file)
@@ -1025,8 +1025,6 @@ int ddebug_remove_module(const char *mod_name)
        struct ddebug_table *dt, *nextdt;
        int ret = -ENOENT;
 
-       v2pr_info("removing module \"%s\"\n", mod_name);
-
        mutex_lock(&ddebug_lock);
        list_for_each_entry_safe(dt, nextdt, &ddebug_tables, link) {
                if (dt->mod_name == mod_name) {
@@ -1036,6 +1034,8 @@ int ddebug_remove_module(const char *mod_name)
                }
        }
        mutex_unlock(&ddebug_lock);
+       if (!ret)
+               v2pr_info("removed module \"%s\"\n", mod_name);
        return ret;
 }