summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm/rocm/0000-fix-openmp.patch
blob: 2811df7d29f784ce883e0ba288ba4efd0dd737e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/libomptarget/plugins/amdgpu/impl/impl.cpp b/libomptarget/plugins/amdgpu/impl/impl.cpp
index 80e024789..3a14e0889 100644
--- a/libomptarget/plugins/amdgpu/impl/impl.cpp
+++ b/libomptarget/plugins/amdgpu/impl/impl.cpp
@@ -21,10 +21,11 @@ bool is_locked(void *ptr, hsa_status_t *err_p, void **agentBaseAddress) {
   info.size = sizeof(hsa_amd_pointer_info_t);
   err = hsa_amd_pointer_info(ptr, &info, nullptr, nullptr, nullptr);
 
-  if (err != HSA_STATUS_SUCCESS)
+  if (err != HSA_STATUS_SUCCESS) {
     DP("Error when getting pointer info\n");
-  else
+  } else {
     is_locked = (info.type == HSA_EXT_POINTER_TYPE_LOCKED);
+  }
 
   if (is_locked && agentBaseAddress != nullptr) {
     // When user passes in a basePtr+offset we need to fix the