From 9b28067b599c5150c70ebb32ccd8285288eb0851 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Mon, 2 Jun 2025 18:25:40 +0200 Subject: [PATCH] rusticl: move unmap out of debug_assert_eq statement Fixes: da4de8d7e33 ("rusticl: add support for coarse-grain buffer SVM") Part-of: --- src/gallium/frontends/rusticl/core/context.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/rusticl/core/context.rs b/src/gallium/frontends/rusticl/core/context.rs index 82bc0177ef8..6eef5377213 100644 --- a/src/gallium/frontends/rusticl/core/context.rs +++ b/src/gallium/frontends/rusticl/core/context.rs @@ -64,7 +64,8 @@ impl Drop for SVMAlloc { if let Some(vma) = self.vma { let address = vma.get() as usize as *mut c_void; unsafe { - debug_assert_eq!(0, munmap(address, self.size())); + let ret = munmap(address, self.size()); + debug_assert_eq!(0, ret); } Platform::get()