schema tree BUGFIX use return value
diff --git a/src/tree_schema.c b/src/tree_schema.c
index 54c5509..33dd7a5 100644
--- a/src/tree_schema.c
+++ b/src/tree_schema.c
@@ -688,8 +688,7 @@
         }
 
         /* full recompilation */
-        lys_recompile(mod->ctx, NULL);
-        return LY_SUCCESS;
+        return lys_recompile(mod->ctx, NULL);
     }
 
     /* we have module from the current context */