xml BUGFIX uninitialized var use
diff --git a/src/xml.c b/src/xml.c
index a0994bd..97e6abb 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -686,8 +686,7 @@
     LY_CHECK_RET(ly_set_add(&xmlctx->elements, e, 1, NULL));
     if (xmlctx->elements.count > LY_MAX_BLOCK_DEPTH) {
         LOGERR(xmlctx->ctx, LY_EINVAL, "The maximum number of open elements has been exceeded.");
-        ret = LY_EINVAL;
-        goto cleanup;
+        return LY_EINVAL;
     }
 
     /* skip WS */