diff --git a/llvm/lib/Support/Compression.cpp b/llvm/lib/Support/Compression.cpp index 6f3dd984416aa0..3979ca6acaf74e 100644 --- a/llvm/lib/Support/Compression.cpp +++ b/llvm/lib/Support/Compression.cpp @@ -206,10 +206,9 @@ Error zstd::decompress(ArrayRef Input, uint8_t *Output, const size_t Res = ::ZSTD_decompress( Output, UncompressedSize, (const uint8_t *)Input.data(), Input.size()); UncompressedSize = Res; - if (ZSTD_isError(Res)) { + if (ZSTD_isError(Res)) return make_error(ZSTD_getErrorName(Res), inconvertibleErrorCode()); - } // Tell MemorySanitizer that zstd output buffer is fully initialized. // This avoids a false report when running LLVM with uninstrumented ZLib. __msan_unpoison(Output, UncompressedSize);